convert NULL into a value
convert NULL into a value
От:
"Jonathan Man" <jman@equityunderwriters.com.hk>
Дата:
Hi,
There is a function on the Oracle. That is NVL(field, 0) to convert null into a value (e.g. ZERO).
Can I use this function on the PostgreSQL??
Thank you for your help!!
Regards,
JONATHAN MAN
Re: convert NULL into a value
От:
Ludwig Lim <lud_nowhere_man@yahoo.com>
Дата:
--- Jonathan Man wrote: > Hi, > > There is a function on the Oracle. That is > NVL(field, 0) to convert null into a value (e.g. > ZERO). > > Can I use this function on the PostgreSQL?? > -- The equivalent function is PostgreSQL is SELECT COALESCE(field,0) regards, ludwig. __________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com
Re: convert NULL into a value
От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:
No, the SQL standard command is COALESCE. --------------------------------------------------------------------------- Jonathan Man wrote: > Hi, > > There is a function on the Oracle. That is NVL(field, 0) to convert null into a value (e.g. ZERO). > > Can I use this function on the PostgreSQL?? > > > Thank you for your help!! > > Regards, > > JONATHAN MAN -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073