question

BlueLiner avatar image
BlueLiner asked

Adding 2 Case statements

I have 2 separate case statements which are producing the correct results: Case when A_staff_Service_Type.type = 'v' then isnull(Indirect_Duration,0)/60.00 else null end Case when pt_service.service_code = 'N06 ' then isnull(direct_Duration,0)/60.00 else null End What I would like to do is have these 2 combined into 1 statement where the results are added together, but I can't seem to get it to work.
case
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

what are you expecting to happen if one of those CASE returns NULL and the other doesn't?
0 Likes 0 ·

1 Answer

·
BlueLiner avatar image
BlueLiner answered
I changed Null to 0 and got the correct results. Thanks.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.