Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Iif() in sql server
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01102340
Message ID:
01102341
Vues:
15
Hi Riyaz,

...from BOL:
SELECT    'Price Category' = 
      CASE 
         WHEN price IS NULL THEN 'Not yet priced'
         WHEN price < 10 THEN 'Very Reasonable Title'
         WHEN price >= 10 and price < 20 THEN 'Coffee Table Title'
         ELSE 'Expensive book!'
      END,
   CAST(title AS varchar(20)) AS 'Shortened Title'
FROM titles
ORDER BY price
MartinJ

>hi
>i am trying to create a view in sql server 2000...
>in my select statement i want to use iif() function , but it gives a error.
>
>my syntax is select iif(xfield1 = 1,xfield1,xfield2) as new_field_name
>
>but this gives an error.....
>pls let me know how to use iif() function in sql server
>
>thanx
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform