Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL query w. embedded CASE [var] when NOT working
Message
 
À
07/10/2003 07:29:15
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00835692
Message ID:
00835695
Vues:
10
Hi Donald,

You can use IIF(,,):
SELECT IIF(UPPER(lr_accept)='F','Full', ;
       IIF(UPPER(lr_accept)='P','Partial', ;
       IIF(UPPER(lr_accept)='R','Rejected','OTHER'))) ;
        as accept , ;
   lr_number, ;
   lr_projid ;
FROM DD_Lar


>SELECT 'accept' = ;
>      CASE UPPER(lr_accept) ;
>         WHEN 'F' THEN 'Full' ;
>         WHEN 'P' THEN 'Partial' ;
>         WHEN 'R' THEN 'Rejected' ;
>         ELSE 'OTHER' ;
>      END, ;
>   lr_number, ;
>   lr_projid ;
>FROM DD_Lar
MartinJ

>
>
>This works just fine in my SQL Server 7 environment (different database, same table schema).
>
>Why does this NOT work in VFP8. What can I use that is similar?
>
>Fred Z.
"Navision is evil that needs to be erazed... to the ground"

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

Click here to load this message in the networking platform