Null Conversion - Mailing list pgsql-general

From Mike Withers
Subject Null Conversion
Date
Msg-id 3.0.32.20010815111637.01b9ae30@sovereign.macarthur.uws.edu.au
Whole thread Raw
Responses Re: Null Conversion  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: Null Conversion  (Jason Turner <jasont@indigoindustrial.co.nz>)
List pgsql-general
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.

Thanks in anticipation
Mike Withers
University of Western Sydney
Australia

pgsql-general by date:

Previous
From: Geoffrey Gallaway
Date:
Subject: Re: PGSQL Intro & Concepts PDF
Next
From: Stephan Szabo
Date:
Subject: Re: Null Conversion