Exec a text variable as select

Started by Ranieri Mazilialmost 19 years ago2 messagesgeneral
Jump to latest
#1Ranieri Mazili
ranieri.oliveira@terra.com.br

Hello,

I'm creating a function that will create a select statement into a
while, this select will be stored into a text variable, after while ends
I need to execute this query stored into variable, on SQLSERVER I can do:
EXEC(text_variable)
How can I do this on Postgres?

I appreciate any help
Thanks

#2A. Kretschmer
andreas.kretschmer@schollglas.com
In reply to: Ranieri Mazili (#1)
Re: Exec a text variable as select

am Mon, dem 18.06.2007, um 10:14:32 -0300 mailte Ranieri Mazili folgendes:

Hello,

I'm creating a function that will create a select statement into a
while, this select will be stored into a text variable, after while ends
I need to execute this query stored into variable, on SQLSERVER I can do:
EXEC(text_variable)
How can I do this on Postgres?

With EXECUTE.

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net