I am tring to query a table and it doesnt seem to be working. can anyone assist?
SELECT ExitReason AS CallsAbandoned
FROM queuecall
WHERE (ExitReason = 7) THEN
(ExitReason = 1 ELSE
(ExitReason = 0)))
The deninition or outcome i am looking for is:
if {ExitReason} = 7 THEN 1 ELSE 0
I am not sure how complete the right query.
Thanks, Arron
The following is what you are looking for:
Or if you are wanting a count of the result of the CASE then try the following: