Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select VFP vs SQL Server
Message
From
18/09/2014 11:42:40
Mike Yearwood
Toronto, Ontario, Canada
 
 
To
18/09/2014 10:31:16
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01607580
Message ID:
01607819
Views:
59
>>>>>>For me a more relevant question would be to find a way to strip the trailing comma in an expression that has something like these:
>>>>>>
>>>>>>
>>>>>>inlist(upper(MyTable.MyField),'TEST1','TEST2',)
>>>>>>or
>>>>>>inlist(upper(MyTable.MyField),'TEST1','TEST2','TEST3',)
>>>>>>
>>>>>>
>>>>>>taking into account the the entire expression can have other expressions. For example, the entire string could be something like this:
>>>>>>
>>>>>>
>>>>>>"MyTable.MyField2 = '123' and inlist(upper(MyTable.MyField),'TEST1','TEST2',) and MyTable.MyField3 > 33"
>>>>>>
>>>>>>
>>>>>>So I need to find - within the long expression - if the "inlist()" has a trailing comma.
>>>>>
>>>>>That is called treating the symptom and not the cause. The test1, test2, test3 was built somewhere. That is the root cause.
>>>>
>>>>I concur. It would be easy to strtran(builtstring, ",)", ")")... but the list shouldn't be like this in the first, second and any other place.
>>>
>>>Right
>>>
>>>why bother fixing something quickly when you can ponder on what it all means for days
>>
>>Because the quick fix makes for a frankenstein's monster of a code base - spreading like cancer, instead of trimmed neat like a rose garden.
>
>last time I was in a rose garden it was full of thorns

That's because no good developers altered the base class to remove the thorns, because they're all too busy treating the scratches.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform