Re: Null Conversion

From: Jason Turner <jasont(at)indigoindustrial(dot)co(dot)nz>
To: Mike Withers <M(dot)withers(at)uws(dot)edu(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Null Conversion
Date: 2001-08-15 01:20:03
Message-ID: 20010815132003.A3098@camille.indigoindustrial.co.nz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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"

sal * 12 * CAST(COMM AS float8) AS "Annual Income"

Cheers

Jason
--
Indigo Industrial Controls Ltd.
64-21-343-545
jasont(at)indigoindustrial(dot)co(dot)nz

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Barry Lind 2001-08-15 01:23:02 Re: [ADMIN] initdb on postgresql 7.1.2 running under cygwin on win 2000
Previous Message Mike Withers 2001-08-15 01:16:38 Null Conversion