Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select Optimisation changes under VFP8?
Message
From
03/06/2003 13:42:25
 
 
To
03/06/2003 12:21:27
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00795674
Message ID:
00795806
Views:
15
Hi Dominic,

right!

Many brains have constructed VFP, but these did not have them same thoughts.

Uses IIF():
SELECT * FROM table WHERE (field = 'abc' and SomeFunction(field))
it becomes
SELECT * FROM table WHERE IIF(field = 'abc',SomeFunction(field),.F.)
Attention!

This optimize NULL expression.

If you need NULL logic propagation ( like IF evaluation )
(for example need evaluate field NULL into SomeFunction):
SELECT * FROM table WHERE IIF(field # 'abc',.F.,field = 'abc' AND SomeFunction(field))
Fabio
Previous
Reply
Map
View

Click here to load this message in the networking platform