Rimo72
Rimo72

Reputation: 91

Issue with sum(case when ... ) with multiple condition

Quick one. I would like to place multiple condition in a case when command.

Here is what I would like to achieve:

sum(case when "Ticket Number" LIKE 'INC%' AND "Support Person" = null  then 1 else 0 end) 'INC N/A'

The AND is not working. What would be the right syntax?

Thanks,

Upvotes: 0

Views: 1242

Answers (1)

Luiggi Mendoza
Luiggi Mendoza

Reputation: 85779

Use IS NULL instead of = null:

when "Ticket Number" LIKE 'INC%' AND "Support Person" IS NULL

Upvotes: 1

Related Questions