Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF in a SELECT
Message
De
09/03/2000 14:31:48
 
 
À
09/03/2000 13:57:38
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Divers
Thread ID:
00343773
Message ID:
00343796
Vues:
17
>I understand that it not fires with the wait waindow and it is o.k.
>
>But, what I don't understand it's WHY it is execute in the SELECT ?
>
>It's not supposed to be execute !

It must have something to do with the order of execution, and Fox is calling the test() function to get the expression ready in case it is needed -- probably once when it first parses the SELECT statement, and once when it executes it for your 1 record.

A better approach would probably be to call a function with the cValue as a parameter, and let the function handle the logic and return whatever is needed:
SELECT myfunc(cValue) AS textvalue...
Just be sure to pad the result to the desired length before returning the value.
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform