Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What does this text do?
Message
From
16/09/2008 21:49:19
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01348085
Message ID:
01348091
Views:
16
Hi Michael,

>In a SQL select statement. (original code VFP 5) I came across the code below as part of the WHERE clause
>
>(Empty(?ThisForm.Customer) or  ?ThisForm.Customer= Ordhead.customerid)
>
>
>As stated previously, empty is not rushmore optimizable, therefore how do I change this to return the same info. I am rewriting the queries in VFP 9 and wish to get the same results.
>
>Mike

If your backend was SQL Server, not VFP, interrogation signal (?) will indicate to SQL that variable after the ? is a external variable (eg.: a public variable in VFP). I think that ? in VFP has no effect (I'm not sure, never try this).
If your form's property Customer be a number you can to do this:
(ThisForm.Customer = 0 or  ThisForm.Customer = Ordhead.customerid)
Good luck!
Erick
Força Sempre!
Strength Always!
Previous
Reply
Map
View

Click here to load this message in the networking platform