Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
IIF statement
Message
 
 
À
24/09/2001 17:43:47
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00560189
Message ID:
00560279
Vues:
23
>I am not sure if this would work inside of SELECT statement.
>What I am trying to do is:
>
>SELECT FROM myTable.*, IIF(myTable.GoodBad, "Good", "Bad") as MyExp
>
>I need to add few calculated fields to my query.

Yes it will work in select
SELECT *,  CASE WHEN myTable.GoodBad=1 THEN  'Good' ELSE 'Bad' END as MyExp
    FROM mytable 
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform