I want a query like this:
if ((select closedatetime from tbl_eventschedularmaster where eventid=p_EventId)> sysdate)
then
update tbL_ANSWERMASTER set AnsText=p_AnsText
where AnsId=p_checkduplicate RETURNING AnsId INTO p_ReturnVal;
else
RETURNING 0 INTO p_ReturnVal;
end if
but it is not working