Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you nest CASE statements in SPT for SQL 7
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00258343
Message ID:
00258974
Views:
10
>I tried several versions in SQL Server Query Analyzer, but couldn't get any to work. I tried:
>
>CASE field1
> WHEN 'A' THEN
> CASE field2
> WHEN 0 THEN field3*(field4/100)
> ELSE field3*(field5/100) END AS amt_paid
> ELSE CASE field6
> WHEN 0 THEN field3*(field7/100)
> ELSE field3*(field7/100) END AS amt_paid
>
>to no avail. Couldn't get it to work, so I created a cursor and solved it using several steps.
>
>If you have any ideas, let me know.
>
>Thanks,
>Doug

It looks right, but I'll take you word on it not working.

__Stephen
Previous
Reply
Map
View

Click here to load this message in the networking platform