Hi Gabriel,
I am not very adept in using PLPGSQL.
Once I had tried to create a query dynamically and execute it
but did not work out (but i do not exactly remeber the problem).
but what i feel is using "EXECUTE" would be a overkill.
I think Jeff has almost solved your problem and with your little
coperation the problem can be sorted out.
If you still really need the solution desperately
i would apprecite if you could prepare an .sql file
which creates , the table and inserts some data relevent
to the SQL query into it , attach it and post to the list.
Regds
Mallah.
> And I need to know how can a query be executed substituting
> variables.
>
On Friday 24 May 2002 01:54 pm, Gabriel Dovalo Carril wrote:
> "Rajesh Kumar Mallah." escribió:
> > I guess the examples on standard docs explain it.
> > dont they?
>
> Hi Rajesh,
>
> I have read docs examples again, and even examples at:
>
> http://www.brasileiro.net/postgres/plpgsql/plpgsql-description.html
>
> section 1.2.5.3, which explains how to execute dynamic queries.
> At the end of this section there is an example with a comment:
>
> -- This works because we are not substituting any variables
> -- Otherwise is would fail.
>
> And I need to know how can a query be executed substituting
> variables.
>
> Thanks,
--
Rajesh Kumar Mallah,
Project Manager (Development)
Infocom Network Limited, New Delhi
phone: +91(11)6152172 (221) (L) ,9811255597 (M)
Visit http://www.trade-india.com ,
India's Leading B2B eMarketplace.