General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
I can not explain it but it is not related to iif(), but rather to WHERE.
This works properly:
*--------------------
sele * from .... where iHi(supplier_id)
*>>>
Procedure iHi
Parameter pp
return !iif(pp <" 10",.t.,.f.)
*---------------------------------
>Can somebody explain the following?
>
>Taking the Tastrade sample:
>Type the following in to the command window:
> SELECT * from supplier WHERE IIF(supplier_id < " 10",.T.,.F.)
>
>You get the records with ID's of 1 to 9
>
>If you add a not to it:
>SELECT * from supplier WHERE !IIF(supplier_id < " 10",.T.,.F.)
>
>I know that the expression "IIF(xxx,.T.,.F.)" is as even more pointless than "IF xxx = .T." but it was actually generated by a querying tool we have written. Of course, I could fix the problem, but I am intrigued since I am pretty sure that I am up against my own ignorance rather than a bug. Any intelligible explanation would be gratefully received!
Previous
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