Cannot get a CASE WHEN to work in my query using a variable.
select field1, field2
from table
where 1=1
AND GLCC.SEGMENT2
(CASE
WHEN :P_AccountType = 'B' THEN < 40000
WHEN :P_AccountType = 'P' THEN => 40000
ELSE
BETWEEN '00000' AND '99999'
END)
any idea where/what I do wrong
Many thanks.