Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 83D66476851 for ; Thu, 12 Dec 2002 08:43:36 -0500 (EST) Received: from web20106.mail.yahoo.com (web20106.mail.yahoo.com [216.136.226.43]) by postgresql.org (Postfix) with SMTP id 3477D4762C7 for ; Thu, 12 Dec 2002 08:43:29 -0500 (EST) Message-ID: <20021212134332.42226.qmail@web20106.mail.yahoo.com> Received: from [200.45.99.243] by web20106.mail.yahoo.com via HTTP; Thu, 12 Dec 2002 10:43:32 ART Date: Thu, 12 Dec 2002 10:43:32 -0300 (ART) From: =?iso-8859-1?q?H=E9ctor=20Iturre?= Subject: Re: Stored Procedure Problem To: Atul In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/155 X-Sequence-Number: 10743 Hi, use this CREATE FUNCTION b_function() RETURNS int4 AS ' DECLARE an_integer int4; BEGIN select into an_integer emp_id from employee; return an_integer; END; ' LANGUAGE 'plpgsql'; --- Atul escribió: > Hello, > > Atul Here, I have one problem while > accessing Database > Records Or Recordset from stored procedure. > Procedure is like this, > > CREATE FUNCTION b_function() RETURNS int4 AS ' > DECLARE > an_integer int4; > BEGIN > select emp_id from employee; > return an_integer; > END; > ' > LANGUAGE 'plpgsql'; > > I create the procedure . After that I run the > statement like > > Test=#> select b_function(); > > Error comes like > > Error: ERROR: SELECT query has no destination for > result data. > If you want to discard the results, > use PERFORM instead. > WARNING: Error occurred while executing PL/pgSQL > function b_function > WARNING: line 4 at SQL statement > > Also I use PERFORM statement. But still problem is > not resolved. > > Please Help me. I hope your kind co-operation. > > Thanks. > > Atul… > Ahora podés usar Yahoo! Messenger desde tu celular. Aprendé cómo hacerlo en Yahoo! Móvil: http://ar.mobile.yahoo.com/sms.html