Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL Server Syntax IIF()
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00053526
Message ID:
00053531
Vues:
26
>I just ported my data to SQL Server 6.5 and I was wondering if there is any substitute for the IIF() that I used in a few views. For example: Select Site_ID,IIF(Flag="X","Passed","Failed") From xTable.
>
>Any clues are appreciated. tia

Use 'CASE' (I am not sure that I remember right syntax) :
Select 'newfield'=CASE When Flag="X" Then "Passed" Else "Failed" End
From xTable
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform