Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Select VFP vs SQL Server
Message
De
18/09/2014 10:05:06
Mike Yearwood
Toronto, Ontario, Canada
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01607580
Message ID:
01607801
Vues:
54
>>>>>Not so. This is a very simple thing I posted above. In such a simple case, the other cases would be handled differently. You'd need strings bigger than 100 chars before len would be slower and then for all the people who say m. is not important, the differences are not important enough to suggest that doing the conditional check in the loop is better most of the time.
>>>>
>>>>I still wonder why would
>>>>
>>>>>lcString = left(m.lcString,len(m.lcString)-1)
>>>>
>>>>be better than
>>>>
>>>>lcString = trim(m.lcString,1, ',')
>>>
>>>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 know. But Nicholas' approach could be what will help in the interim.

Until the root cause is fixed and then you won't need this extra bit of code and you won't remember to remove it.....
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform