Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIF in a SELECT
Message
 
To
10/03/2000 00:12:51
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00343773
Message ID:
00344036
Views:
49
Vlad,

Some experimentation with your sample code showed that the function is called for everytime it appears in the select. If you remove one of them you get two firings, with two of them you get 6 firings (I can't account for the extra two firings).

However, it always produces the correct results in the resulting cursor, which reinforces something that I have said in my classes for a long time; "The only thing that you can depend on about how SQL SELECT will produce its result is that it will produce its result." IOW, you cannot depend on anything about number of functions calls, selected work areas, table alias names, record pointer positions, or anything else about the internal behavior of a SELECT query.

This is the reason that using UDF's in SELECTs is cautioned in the docs.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform