pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Karl Raven <lcaasia@pd.jaring.my>
To: pgsql-sql@postgresql.org
Subject: Re: change null to 0 in SQL script
Date: Sun, 6 Jan 2002 04:54:07 +0800
Message-ID: <a17p72$bne$1@news.tht.net> (raw)
References: <a10ojd$1v4q$1@news.tht.net>
	<3C360816.1080103@wtal.de>

thanks
will try it..


"ThomasR" <trx@wtal.de> wrote in message news:3C360816.1080103@wtal.de...
> Karl Raven wrote:
>
> > I like to change a null value of a query to 0 in the SQL script. I know
how
> > to do it in MS-SQL server and MS-Access but those commands does not work
in
> > pg-sql.
> >
> > Anyone has any ideas?
> >
> > Thanks
> >
>
> I think the following should work:
>
> select coalesce( my_attrib, 0 ) from my_tab
>
> Thomas
>





view thread (6+ messages)

Message-ID: <a17p72$bne$1@news.tht.net>
Permalink:  ../a17p72$bne$1@news.tht.net/
Also on:    postgresql.org/message-id/a17p72$bne$1@news.tht.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lcaasia@pd.jaring.my
  Subject: Re: change null to 0 in SQL script
  In-Reply-To: <a17p72$bne$1@news.tht.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox