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
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only