Re: isnull() function in pgAdmin3

From: Igor Neyman <ineyman(at)perceptron(dot)com>
To: dudedoe01 <marsalanaq(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: isnull() function in pgAdmin3
Date: 2016-09-27 18:40:51
Message-ID: MWHPR07MB28777547180DC028EF812E10DACC0@MWHPR07MB2877.namprd07.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org [mailto:pgsql-general-owner(at)postgresql(dot)org] On Behalf Of dudedoe01
Sent: Tuesday, September 27, 2016 1:05 PM
To: pgsql-general(at)postgresql(dot)org
Subject: [GENERAL] isnull() function in pgAdmin3

Hi,

I am trying to emulate the isnull() function used in MySQL into postreSQL. I have tried different ways such is null but it's not producing the results desired. I am doing a data migration from MySQL into postgreSQL and need help with the isnull() in pgAdmin3.

Any assistance provided would be greatly appreciated.

Thanks,

In MySQL:

(case
when
((`s`.`Funding_Date` = '')
and (isnull(`s`.`Actual_Close_Date`)
or (`s`.`Actual_Close_Date` = '')))
then
'RPG_INV'
when
((isnull(`s`.`Funding_Date`)
or (`s`.`Funding_Date` <> ''))
and ((`s`.`Actual_Close_Date` = '')
or isnull(`s`.`Actual_Close_Date`)))
then
'Builder_Inventory'
else 'Owner_Inventory'
end) AS `Lot_Status`,

__________________________________________________________________________________________________________

isnull(`s`.`Actual_Close_Date`) in MySQL is equivalent to:

s.actual_close_date IS NULL in Postgres.

What exactly didn't work for you?

Regards,
Igor Neyman

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2016-09-27 18:41:57 Re: isnull() function in pgAdmin3
Previous Message Israel Brewster 2016-09-27 18:40:41 Re: Determining server load