Re: In a view, how do I cause fields with possible NULLs to be treated as a blank string in a replace operation?
От
Asfand Qazi (Sanger Institute)
Тема
Re: In a view, how do I cause fields with possible NULLs to
be treated as a blank string in a replace operation?
Дата
Msg-id
BANLkTimQa520c-QdA8dLVzVsAqz-5V3gVA@mail.gmail.com
Ответ на
Re: In a view, how do I cause fields with possible NULLs to
be treated as a blank string in a replace operation? (Rick Genter)
Список
Дерево обсуждения
In a view, how do I cause fields with possible NULLs to be treated as
a blank string in a replace operation? "Asfand Qazi (Sanger Institute)" <aq2.sanger@gmail.com>
Re: In a view, how do I cause fields with possible NULLs to
be treated as a blank string in a replace operation? Thom Brown <thom@linux.com>
Re: In a view, how do I cause fields with possible NULLs to
be treated as a blank string in a replace operation? Rick Genter <rick.genter@gmail.com>
Re: In a view, how do I cause fields with possible NULLs to
be treated as a blank string in a replace operation? "Asfand Qazi (Sanger Institute)" <aq2.sanger@gmail.com>
On Mon, Jun 27, 2011 at 5:58 PM, Thom Brown wrote: > > Try coalesce: http://www.postgresql.org/docs/9.0/static/functions-conditional.html#AEN15541 > > So if foo is a null value, and you used COALESCE(foo, 'bar'), the > output would be 'bar', otherwise it would be whatever the value of foo > is. > On Mon, Jun 27, 2011 at 5:59 PM, Rick Genter wrote: > Either use '' as some_type, or use COALESCE(some_type, ''). > Thank you both, that worked fine. -- Regards, Asfand Qazi Team 87 HTGT Wellcome Trust Sanger Institute
В списке pgsql-general по дате отправления
От: David Johnston
Дата: