Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Does iif() exist in sqlserver ?
Message
 
À
10/08/2007 05:57:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
01247302
Message ID:
01247305
Vues:
24
>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform