Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can you use CASE statement in SELECT clause
Message
De
29/01/2009 09:55:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
29/01/2009 08:24:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01377873
Message ID:
01378099
Vues:
17
>Yes, EVL() is a way to avoid empty values.

I had guessed it would be similar in concept to the NVL() value. I found the idea so useful that I made my own UDF in Visual FoxPro 6 - we hadn't upgraded to VFP 9 yet.

> Do be warned that, unlike IIF(), it evaluates _all_ its parameters. ...

Oh, iif() would not do this? - OK, I see from the help that it doesn't, but I didn't know that. That might be very useful at times.

In the simple case where you just want to substitute a valid value in a SELECT - SQL, that would not be so relevant, but in other cases it would.

I was aware of a similar problem with a few of my UDFs - all parameters would be evaluated BEFORE executing the UDF proper.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform