IS NULL

Поиск
Список
Период
Сортировка
От David Link
Тема IS NULL
Дата
Msg-id 3BE83155.CDA2A866@soundscan.com
обсуждение исходный текст
Ответы Re: IS NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
How to check a column value for IS NULL?

I would like to format a string as a date iff it is not null:

This frag returns a bogus date when column value is null:

  to_char(to_date (theatre_reldate, 'DDMMYYYY'), 'DD Mon YYYY')

So I'm looking for something of this sort:

 (case when not is null (t.theatre_reldate) then
    to_char(to_date (theatre_reldate, 'DDMMYYYY'), 'DD Mon YYYY')
    end) as theatre_reldate

thanks, david

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

Предыдущее
От: John Burski
Дата:
Сообщение: Re: Casting problem
Следующее
От: Juan Jose Natera Abreu
Дата:
Сообщение: Workaround or user defined type