Recently i have started working in Postgresql 8.4. Im trying to write select and update queries inside a function. I will be passing different parameters to the function. Here is the code example
Select * from TABLE1
where COLUMN1 = isnull(@passedValue1, COLUMN1)
and COLUMN2 = isnull(@passedValue1, COLUMN2)
/*select query wil consider the passed parameter only if it is not null.*/
above query works fine with MSSQL SERVER 2005. But it throws the syntax error when i execute it in POSTGRESQL 8.4.
Can anyone help me in finding the syntax for using ISNULL