0

I am trying to run the below query :

SELECT some_no, some_Grp_No, some_Grp_DESC, somePercent, ISNULL(get_diff,0) AS get_diff
FROM  ....... ;

I am trying to migrate a query from SQL Server to PostgreSQL and on running this query on a PostgreSQL database I am getting the below error :

ERROR:  function isnull(integer, integer) does not exist
LINE 1: ...some_no, some_Grp_No, some_Grp_DESC, somePercent, ISNULL(get...
                                                             ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
SQL state: 42883
Character: 63

Can anybody help me out here. How to avoid this error. Should I use COALESCE instead of ISNULL because COALESCE is working for me but I am unable to decide what to use and why.

Som
  • 1,522
  • 1
  • 15
  • 48

0 Answers0