I don't thing IF is supported here. Would case statement help you ?
select MATNR ,
CASE
WHEN "ERSDA" > '20130405' THEN 'Y'
ELSE 'N'
END as "TEST"
from "SAPXX"."MARA"; You can change your IF condition this way.
Sree
Message was edited by: Sreehari V Pillai