Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace !empty(alias.field) with len(alias.field)>0
Message
 
 
À
15/02/2016 11:44:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01631431
Message ID:
01631492
Vues:
56
Thank you.

>If SFQ doesn't put VFP-only stuff inside the expression, you would write an SP, e.g., myEmpty, that you strtran(kcSQL, "!empty(", "myempty(') with. We had to do that with max() and min() in SQL queries. Or you would just use strtran() to make the substitutions. We did min() and max() as sp's because they required the use of t-sql calls to arrive at the desired result, while this is a simple substitution.
>
>Hank
>
>>Maybe I didn't phrase the question correctly. You see I am using an older version of SFQuery which returns the Filter expression as "!empty(mytable.myfield)" . So I need to parse the returned expression changing the "!empty..." with "len(...)>0". So, in theory I can replace the "!empty(..." with what you are suggesting "rtrim(..." but still I am looking for a way to parse the expression.
>>Thank you.
>>
>>>rtrim([mytable].[myfield]) = ''
>>>
>>>That's two single quotes. The square brackets are T-SQL for "get me out of reserved-word hell, please and thank you."
>>>
>>>Hank
>>>
>>>>Hi,
>>>>
>>>>I need to create a function to replace the expression "!empty(mytable.myfield)" with "len(mytable.myfield)>0" (to make it work for SQL server).
>>>>I played with SUBSTR and STRTRAN functions but can't seem to find a way to get around the fact that the "mytable.myfield" changes from one expression to another. So it has to be "generic."
>>>>I would appreciate any suggestions
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform