Re: total newbie question

From: John Burski <john(dot)burski(at)911ep(dot)com>
To: Tad Naworal <tnaworal(at)syssrc(dot)com>
Cc: "<" <pgsql-general(at)postgresql(dot)org>
Subject: Re: total newbie question
Date: 2001-06-12 16:44:15
Message-ID: 3B2646DF.D71C45EA@911ep.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Your syntax is just a bit off. Try something like

select (column1 + column2) as "Sum" from tablename where cusid = '12123';

It works for me.

Tad Naworal wrote:

> Hi,
>
> I'm trying to add some numeric columns together
>
> select (stotal + ltotal) as total from table where cusid='12123';
>
>
> I searched the docs and could not find an answer.
> any help would be greatly appreciated
>
> thanks
> Tad
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl

--
John Burski
I.T. Manager and Systems Administration
911EP
First in LEDs... The solid state warning light leader.
1-800-863-6911

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Pilsl 2001-06-12 16:52:32 select, where and null-values (or: select null<>'1' is fuzzy)
Previous Message Stephen Howe 2001-06-12 16:43:00 Re: Win32 Compilation