From: | "Robert Balzli Jr" <robert(dot)balzli(at)xilinx(dot)com> |
---|---|
To: | "Richard Broersma Jr" <rabroersma(at)yahoo(dot)com>, "robert(dot)balzli" <robert(dot)balzli(at)xilinx(dot)com> |
Cc: | "General PostgreSQL List" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: I can not add up columns when using a left outer join. Any ideas as to why? |
Date: | 2006-11-03 17:55:59 |
Message-ID: | A2B363B1851A654BAA171A0DE355BDC303A4BD39@XCO-EXCHVS1.xlnx.xilinx.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Thanks Richard! All is working fine now...
> -----Original Message-----
> From: Richard Broersma Jr [mailto:rabroersma(at)yahoo(dot)com]
> Sent: Friday, November 03, 2006 10:50 AM
> To: robert.balzli
> Cc: General PostgreSQL List
> Subject: RE: [GENERAL] I can not add up columns when using a left
outer
> join. Any ideas as to why?
>
> > COALESCE works great! Is there a way to default the LEFT JOIN to
return
> > zero and not NULL? Then we could use COALESCE on strings only. Most
of
> > our columns are integers not strings. This would make our queries
> > simpler for 99% of the columns.
> > Thanks,
> > Robert Balzli
> >
> > PS: I will join the pgsql-general users group today...
>
> No. you will need to have:
>
> select a, b, coalesce(a,0) + coalesce(b,0)
> from your table;
>
> Regards,
>
> Richard Broersma Jr.
>
> PS:
> Also, don't forget to use reply all so that everyone one on the list
can
> participate.
>
From | Date | Subject | |
---|---|---|---|
Next Message | Oleg Bartunov | 2006-11-03 18:03:00 | Re: [HACKERS] Index greater than 8k |
Previous Message | Richard Broersma Jr | 2006-11-03 17:50:04 | Re: I can not add up columns when using a left outer join. Any ideas as to why? |