From: | "Amit jain" <amitjain(dot)bit(at)gmail(dot)com> |
---|---|
To: | tgl(at)sss(dot)pgh(dot)pa(dot)us, pgsql-hackers(at)postgresql(dot)org |
Subject: | use of alias |
Date: | 2008-02-12 05:19:32 |
Message-ID: | daf917830802112119i4d8b8da7rfd65166dc4eca4ab@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hello Everybody,
I am trying to change a oracle function to postgreSQL. I have to use the
function parameter in different query so i need to use alias command.
but i am not able to use this alias in "from clause" of select statment.
could anybody please let me know how can i use it in from clause.i am
getting following error while executing the funciton..
MT ALIAS FOR $1;
ST ALIAS FOR $2;
select count(*) into count1 from MT,ST where MT.phonenumber=ST.phonenumber;
*ERROR: syntax error at or near "$1"
LINE 1: select count(*) from $1 , $2 where MT.phonenumber=ST.phone...
Thanx in Advance for all of your suggestion....*
From | Date | Subject | |
---|---|---|---|
Next Message | Brett McBride | 2008-02-12 05:38:17 | Re: use of alias |
Previous Message | Tom Lane | 2008-02-12 05:04:32 | Re: -U option in psql |