Re:

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re:
Дата
Msg-id 1065004903.2918.6.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Re:  ("Daniel Schuchardt" <daniel_schuchardt@web.de>)
Список pgsql-general
On Wed, 2003-10-01 at 11:19, Daniel Schuchardt wrote:
> But CAST(NULL AS VARCHAR) should make it a varchar

NULL is still null, whatever you cast it to.  The column type is
independent of whether one particular datum is null.

Instead of casting, you want COALESCE(field2, '') to give you an empty
string if the value is null.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Yet if any man suffer as a Christian, let him not be
      ashamed; but let him glorify God on this behalf."
                                        I Peter 4:16


В списке pgsql-general по дате отправления:

Предыдущее
От: Ron Johnson
Дата:
Сообщение: Re:
Следующее
От: Richard Huxton
Дата:
Сообщение: Re: