Re: isnull() function in pgAdmin3 - Mailing list pgsql-general

From Igor Neyman
Subject Re: isnull() function in pgAdmin3
Date
Msg-id MWHPR07MB28777547180DC028EF812E10DACC0@MWHPR07MB2877.namprd07.prod.outlook.com
Whole thread Raw
In response to isnull() function in pgAdmin3  (dudedoe01 <marsalanaq@gmail.com>)
List pgsql-general
-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-owner@postgresql.org] On Behalf Of dudedoe01
Sent: Tuesday, September 27, 2016 1:05 PM
To: pgsql-general@postgresql.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'snot 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



pgsql-general by date:

Previous
From: Israel Brewster
Date:
Subject: Re: Determining server load
Next
From: Adrian Klaver
Date:
Subject: Re: isnull() function in pgAdmin3