Re: dynamic 'INSERT' query?

From: "Dinesh Pandey" <dpandey(at)secf(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "'PostgreSQL'" <pgsql-sql(at)postgresql(dot)org>
Subject: Re: dynamic 'INSERT' query?
Date: 2005-04-14 14:57:46
Message-ID: 20050414150104.457BB53F8C@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Yes here the TABLE NAME is also coming at runtime.

Like In Oracle I have done in this way:
-------------------------------------------
LOOP
v_sql := 'INSERT INTO ' || mytable || ' VALUES(:in_sentryid_id,
:in_node_id)';
EXECUTE IMMEDIATE v_sql USING v_sentryid, v_nodeid;
END LOOP;

How to convert this into Postgres?????

Thanks
Dinesh Pandey

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Dinesh Pandey 2005-04-14 14:58:20 Re: Prepared query ?
Previous Message Frank Bax 2005-04-14 14:54:00 Re: Prepared query ?