I have a function and I need to do different select based on inputid. so I have added the condition as below.
....
begin
IF(iv_binrocess = 1 AND IsNull(iv_binno,'') != '') THEN
...//some process here
END If;
...
End
When I run the function, I got the error "
ERROR: syntax error at or near "IF" I referred many sites and tutorials, nothing helped me.
Can anyone help me to fix this issue?
Thanks
IFin the function body?IsNullfunction, its equivalent in Postgres iscoalesce– see documentation.