General information
Title:
IIF in a SQL Statement
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only