Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does iif() exist in sqlserver ?
Message
 
To
10/08/2007 05:57:25
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
01247302
Message ID:
01247305
Views:
23
>i have tried to creat a remote view using iif() function but sqlserver doen't recognize this. how can i do it ? (i also tried it in sqlserver view designer but it was the same thing)
>
>another function have the same problem : isnull(x,y) sqlsqerver function. works well in sqlserver but doen't work with the remote view designer in vfp.
>
>i need informations to continue my work...

No, there is no IIF() function in SQL Server. You must use CASE statement. i.e. In VFP you could wrote:
SELECT IIF(SomeCondition=something, 1, 0) AS SomeField,
....
in SQL Server this must be:
SELECT CASE WHEN SomeCondition=something
            THEN 1
            ELSE 0 END AS SomeField
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform