Execute Query in Postgres Function

From: "Sumita Biswas (sbiswas)" <sbiswas(at)cisco(dot)com>
To: "'Tom Lane'" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Execute Query in Postgres Function
Date: 2004-02-24 15:35:07
Message-ID: 003901c3faeb$c7d1cd60$2a154d0a@apac.cisco.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

How do we execute a Query String in Postgresql function?
Or what is the equivalent of the following Code in MSSQL Stored
Procedure:


SET @QueryToPopulateTemp = "INSERT INTO
#Tmp_ConferenceDetail(ConferenceType, ConnectTime,
DisconnectTime,DestConversationId, Duration, AppConfId, OrigDeviceName,
DestDeviceName, destLegIdentifier) " +
"SELECT * FROM Tbl_Billing_Data ";

EXEC sp_executesql @QueryToPopulateTemp;

Thanks for any inputs.

Regards,
Sumita

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jonathan M. Gardner 2004-02-24 16:11:03 Materialized View Summary
Previous Message Sumita Biswas (sbiswas) 2004-02-24 11:51:16 CURSORS - Please help urgent.