I guess one solution is to insert into a temporary table in the EXECUTE
statement...
Then execute a SQL query (without EXECUTE) to get the value into the
variable.
I use to do like that with MS SQL Server as there is no other solution...
Hope it helps
----------------------------------------------------------------------------
---------------
Patrick Fiche
email : patrick.fiche@aqsacom.com
tél : 01 69 29 36 18
----------------------------------------------------------------------------
---------------
-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org]On Behalf Of Ivan
Sent: Wednesday, March 05, 2003 6:11 PM
To: Richard Huxton
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] What about SELECT INTO in EXECUTE
but its not SQL error but just in plpgsql ,
SELECT INTO same_var sth from table;
I can not write EXECUTE ''SELECT INTO same_var sth from table;'';
because SELECT INTO not work with EXECUTE , so what can i do else ?
On Wed, 5 Mar 2003, Richard Huxton wrote:
> On Tuesday 04 Mar 2003 8:30 pm, Ivan wrote:
> > when in plpgsql i do EXECUTE ''SELECT INTO foo 4 ''; its not implemented
> > yet, so when ?
>
> I don't think this is valid SQL - should it not be "SELECT 4 INTO foo"?
> --
> Richard Huxton
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
>
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)