pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Sumita Biswas (sbiswas) <sbiswas@cisco.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: pgsql-sql@postgresql.org
Subject: Execute Query in Postgres Function
Date: Tue, 24 Feb 2004 21:05:07 +0530
Message-ID: <003901c3faeb$c7d1cd60$2a154d0a@apac.cisco.com> (raw)
In-Reply-To: <20409.1077506948@sss.pgh.pa.us>

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




Message-ID: <003901c3faeb$c7d1cd60$2a154d0a@apac.cisco.com>
Permalink:  ../003901c3faeb$c7d1cd60$2a154d0a@apac.cisco.com/
Also on:    postgresql.org/message-id/003901c3faeb$c7d1cd60$2a154d0a@apac.cisco.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sbiswas@cisco.com, tgl@sss.pgh.pa.us
  Subject: Re: Execute Query in Postgres Function
  In-Reply-To: <003901c3faeb$c7d1cd60$2a154d0a@apac.cisco.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox