Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 39984475BC3 for ; Sun, 7 Jul 2002 09:32:41 -0400 (EDT) Mailbox-Line: From mallah@trade-india.com Sun Jul 7 09:32:41 2002 Received: from mail-relay.trade-india.com (mail-relay.trade-india.com [203.196.129.235]) by postgresql.org (Postfix) with SMTP id 69728475AA8 for ; Sun, 7 Jul 2002 09:32:37 -0400 (EDT) Received: (qmail 5751 invoked from network); 7 Jul 2002 13:25:39 -0000 Received: from system67.trade-india-local.com (192.168.0.67) by infocom-236-129-del.trade-india.com with SMTP; 7 Jul 2002 13:25:39 -0000 Content-Type: text/plain; charset="iso-8859-1" From: "Rajesh Kumar Mallah." Organization: Infocom Network Limited. To: teknokrat@yahoo.com (teknokrat), pgsql-sql@postgresql.org Subject: Re: Can this be done with sql? Date: Sun, 7 Jul 2002 19:06:02 +0530 User-Agent: KMail/1.4.1 References: <1cbae208.0207031032.7d1be1a2@posting.google.com> <1cbae208.0207041305.43dffc0@posting.google.com> In-Reply-To: <1cbae208.0207041305.43dffc0@posting.google.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200207071906.02853.mallah@trade-india.com> X-Spam-Status: No, hits=-5.4 required=5.0 tests=IN_REP_TO,X_NOT_PRESENT,SUBJ_ENDS_IN_Q_MARK version=2.30 X-Spam-Level: X-Archive-Number: 200207/78 X-Sequence-Number: 8457 Hi, You cannot easily return datasets from stored procedures. there has been lots of discussion on it. regds mallah. > yes, thank you, that may help but unfortunately there are are few more > problems to face. > > 1. I will need to select groups from anywhere in the table so i cannot > assume that 1 will be the start number. They will be contigous however so= i > can use another query top get the start number but is it possible to do it > with just one select? > > 2. I need to display not just aggregates but the first and last value in > the group for two of the fields. I mean by this that i need > opening_value(field1) and closing_value(field2). > > 3. If this needs to be done via stored procedure how do i get it to return > a result set. I've tried setof record but it doesn't work. > > thanks > > > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org --=20 Rajesh Kumar Mallah, Project Manager (Development) Infocom Network Limited, New Delhi phone: +91(11)6152172 (221) (L) ,9811255597 (M) Visit http://www.trade-india.com , India's Leading B2B eMarketplace.