Link to home
Start Free TrialLog in
Avatar of mburk1968
mburk1968Flag for United States of America

asked on

SQL Query

I have the following code in SQL Procedure
CONVERT(MONEY, ISNULL(CededFile.ExpPaid, 0)) AS [Expense Paid Ceded]

What I want from this field is still be converted to money however if
ClaimNo = 4-08-0011A then Expense Paid Ceded = 755.10 else Expense Paid Ceded
or
ClaimNo = 4-08-0016A then Expense Paid Ceded = 2835.36 else Expense Paid Ceded or
or
ClaimNo = 4-09-0003A then Expense Paid Ceded = 9042.10 else Expense Paid Ceded or
or
ClaimNo = 4-8-0001A then Expense Paid Ceded = 2296.60 else Expense Paid Ceded or
or
ClaimNo = 4-7-0014 then Expense Paid Ceded = 0.00 else Expense Paid Ceded
ASKER CERTIFIED SOLUTION
Avatar of knightEknight
knightEknight
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SELECT [Expense Paid Ceded] =CASE  ClaimNo
         when ClaimNo = '4-08-0011A' then 755.10
         when ClaimNo = '4-08-0016A ' then 2835.36
         when ClaimNo = '4-09-0003A' then 9042.10
         when ClaimNo = '4-8-0001A' then 2296.60
         when ClaimNo = '4-07-0014' then 0.00
         else
         CONVERT(MONEY, ISNULL(CededFile.ExpPaid, 0))
         END
         
         
         FROM yourtable