alias question

From: Ceasar <ocerda(at)hotmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: alias question
Date: 2001-12-13 06:20:36
Message-ID: 3C18488A.E20EDF9F@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I was wondering if you could use an alias to do math calculations: for
example,

select Bank1,
(var1 + var2) as calc,
calc*100 as var2

From......

I keep getting this message that says that calc is not in any of the
tables in the From statement. Is it possible to use a alias (calc) to
make further calculations? If so, how? Any help would be greatly
appreciated.

ocerda(at)hotmail(dot)com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2001-12-13 06:33:02 Re: foreign key creation problem
Previous Message Adam Fisher 2001-12-13 06:19:12 Re: foreign key creation problem