Re: Null Conversion

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Null Conversion
Дата
Msg-id Pine.BSF.4.21.0108141827210.71248-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Null Conversion  (Mike Withers <M.withers@uws.edu.au>)
Список pgsql-general
On Wed, 15 Aug 2001, Mike Withers wrote:

> Can anyone tell me how I might convert a null attribute value into a zero
> attribute value such that it can be multiplied in a query.
>
> In Oracle I could do:
>
> sal*12*NVL(COMM, 0) AS "Annual Income"
>
> where COMM is an attribute (a salesman commission, in an employes table)
> which has null values. This allows null commissions for non salesmen to
> give a zero calculated value. The NVL converts a null into zero.

Try coalesce(COMM, 0)




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

Предыдущее
От: Mike Withers
Дата:
Сообщение: Null Conversion
Следующее
От: Jason Turner
Дата:
Сообщение: Re: Null Conversion