Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IIF in a SQL Statement
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
IIF in a SQL Statement
Miscellaneous
Thread ID:
00810425
Message ID:
00810425
Views:
44
Hi.
Usually when I have few comboboxes on a screen, I pass the criterias to the SQL Statement directly like this :
Office = '191' *variable of one combobox

Select * from table1 where iif(Office = 'ALL',.T.,table1.office = ?office)

If the combobox's value is 'ALL', then the expression returns .t.

This works fine in VFP but what about SQL Server or remote views !

SQL Server does not understand .t. or true in the SQL statement.

How should I recreate the same functionallity ?
Next
Reply
Map
View

Click here to load this message in the networking platform