From: | Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com> |
---|---|
To: | dudedoe01 <marsalanaq(at)gmail(dot)com>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: isnull() function in pgAdmin3 |
Date: | 2016-09-27 18:41:57 |
Message-ID: | 80becd5e-2fcf-5660-574b-82bcb040e18a@aklaver.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 09/27/2016 10:04 AM, dudedoe01 wrote:
> 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`,
>
>
aklaver(at)test=> select 1 is null;
?column?
----------
f
(1 row)
aklaver(at)test=> select null is null;
?column?
----------
t
or
^
aklaver(at)test=> select 1 isnull;
?column?
----------
f
(1 row)
aklaver(at)test=> select null isnull;
?column?
----------
t
(1 row)
>
> --
> View this message in context: http://postgresql.nabble.com/isnull-function-in-pgAdmin3-tp5923122.html
> Sent from the PostgreSQL - general mailing list archive at Nabble.com.
>
>
--
Adrian Klaver
adrian(dot)klaver(at)aklaver(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2016-09-27 18:44:29 | Re: isnull() function in pgAdmin3 |
Previous Message | Igor Neyman | 2016-09-27 18:40:51 | Re: isnull() function in pgAdmin3 |