Re: [SQL] using EXECUTE on Selects

2007-07-11 Thread Radhika Sambamurti
Thanks! That worked. I really could'nt make sense of the documentation, the way it was worded. I tested it out and it works. Thanks again! Radhika > 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 buil

Re: [SQL] using EXECUTE on Selects

2007-07-11 Thread A. Kretschmer
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 'endda

Re: [SQL] using EXECUTE on Selects

2007-07-11 Thread Andrew Sullivan
On Wed, Jul 11, 2007 at 12:41:21PM -0400, Radhika Sambamurti wrote: > 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. > > Is there a way

Re: [SQL] using EXECUTE on Selects

2007-07-11 Thread Rodrigo De León
On 7/11/07, Radhika Sambamurti <[EMAIL PROTECTED]> wrote: Is there a way to select data using EXECUTE? FOR-IN-EXECUTE. See: http://www.postgresql.org/docs/8.2/static/plpgsql-control-structures.html#PLPGSQL-RECORDS-ITERATING ---(end of broadcast)

[SQL] using EXECUTE on Selects

2007-07-11 Thread Radhika Sambamurti
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 whe

[SQL] using EXECUTE on Selects

2007-07-11 Thread Radhika Sambamurti
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 whe