Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL query w. embedded CASE [var] when NOT working
Message
 
To
07/10/2003 07:29:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00835692
Message ID:
00835695
Views:
9
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform