Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 2B5BB9FBF58 for ; Wed, 11 Jul 2007 13:41:28 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 06897-04 for ; Wed, 11 Jul 2007 13:41:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from rootabega.88thstreet.com (dsl254-071-237.nyc1.dsl.speakeasy.net [216.254.71.237]) by postgresql.org (Postfix) with ESMTP id B76D49FBF68 for ; Wed, 11 Jul 2007 13:41:24 -0300 (ADT) Received: from www.88thstreet.com (localhost [IPv6:::1]) by rootabega.88thstreet.com (8.13.3/8.13.3) with ESMTP id l6BGfKOG002992 for ; Wed, 11 Jul 2007 12:41:21 -0400 (EDT) Received: from 63.118.86.10 (SquirrelMail authenticated user radhika) by www.88thstreet.com with HTTP; Wed, 11 Jul 2007 12:41:21 -0400 (EDT) Message-ID: <25474.63.118.86.10.1184172081.squirrel@www.88thstreet.com> Date: Wed, 11 Jul 2007 12:41:21 -0400 (EDT) Subject: using EXECUTE on Selects From: "Radhika Sambamurti" To: pgsql-sql@postgresql.org Reply-To: radhika@88thstreet.com User-Agent: SquirrelMail/1.4.5 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/53 X-Sequence-Number: 28788 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. Is there a way to select data using EXECUTE? Thanks. Radhika -- It is all a matter of perspective. You choose your view by choosing where to stand. Larry Wall ---