Re: [HACKERS] use of alias

2008-02-11 Thread Brendan Jurd
Though to be safe you should be quoting MT and ST with quote_ident() before putting them into a dynamic statement. Cheers BJ On Feb 12, 2008 4:38 PM, Brett McBride <[EMAIL PROTECTED]> wrote: > you could do this with 'execute' like so: > > execute 'select count(*) into count1 from ' || MT || ','

Re: [HACKERS] use of alias

2008-02-11 Thread Brett McBride
you could do this with 'execute' like so: execute 'select count(*) into count1 from ' || MT || ',' || ST || ' where ' || MT || '.phonenumber= ' || ST || '.phonenumber' into v_variable; brett Amit jain wrote: Hello Everybody, I am trying to change a oracle function to postgreSQL. I have to

[HACKERS] use of alias

2008-02-11 Thread Amit jain
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