From: | "Patrick Fiche" <patrick(dot)fiche(at)aqsacom(dot)com> |
---|---|
To: | "'Ivan'" <iv(at)psycho(dot)pl> |
Cc: | "PostgreSQL - General (E-mail)" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: What about SELECT INTO in EXECUTE |
Date: | 2003-03-05 17:20:06 |
Message-ID: | 85058ADF852DD5118FD50002A528A5B6079B87@SERVEUR |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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(dot)fiche(at)aqsacom(dot)com
tél : 01 69 29 36 18
----------------------------------------------------------------------------
---------------
-----Original Message-----
From: pgsql-general-owner(at)postgresql(dot)org
[mailto:pgsql-general-owner(at)postgresql(dot)org]On Behalf Of Ivan
Sent: Wednesday, March 05, 2003 6:11 PM
To: Richard Huxton
Cc: pgsql-general(at)postgresql(dot)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(at)postgresql(dot)org)
>
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2003-03-05 17:38:33 | Re: 7.3 rpms or not? |
Previous Message | Ivan | 2003-03-05 17:17:36 | commpare 2 tables |