Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you use CASE statement in SELECT clause
Message
From
29/01/2009 09:55:41
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
29/01/2009 08:24:19
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01377873
Message ID:
01378099
Views:
19
>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)
Previous
Reply
Map
View

Click here to load this message in the networking platform