From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: using EXECUTE on Selects |
Date: | 2007-07-11 17:08:06 |
Message-ID: | 20070711170806.GA26121@a-kretschmer.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
am Wed, dem 11.07.2007, um 12:41:21 -0400 mailte Radhika Sambamurti folgendes:
> Hi,
>
> Here is my need:
>
> I have to select data by building up the where clause:
> example: WHERE firm = 'nnn'
> WHERE firm = 'nnn' AND symbol = 'bbb'
> WHERE date BETWEEN 'startdate' AND 'enddate' AND symbol = 'bbb'
>
> And so on.
>
> I was hoping to write a function where I can build up my where clause
> (dynamic sql) and use the EXECUTE command with it. But I just read that
> the SELECT INTO has not been implemented for use with EXECUTE.
You can use "execute sql into foo;" with sql your dynamic sql and foo
your variable to store the result.
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
From | Date | Subject | |
---|---|---|---|
Next Message | Radhika Sambamurti | 2007-07-11 17:35:43 | Re: using EXECUTE on Selects |
Previous Message | Andrew Sullivan | 2007-07-11 16:52:44 | Re: using EXECUTE on Selects |