Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id BA327475EF0 for ; Thu, 12 Dec 2002 08:31:27 -0500 (EST) Received: from ns2.imcindia.net (unknown [203.129.231.83]) by postgresql.org (Postfix) with ESMTP id CF778476003 for ; Thu, 12 Dec 2002 08:31:24 -0500 (EST) Received: from virgo ([203.129.231.85]) by ns2.imcindia.net (8.9.3/8.9.3) with SMTP id TAA30657 for ; Thu, 12 Dec 2002 19:14:18 +0530 From: "Atul" To: Subject: Stored Procedure Problem Date: Thu, 12 Dec 2002 19:11:36 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0004_01C2A212.4A6836D0" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/153 X-Sequence-Number: 10741 This is a multi-part message in MIME format. ------=_NextPart_000_0004_01C2A212.4A6836D0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit 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… ------=_NextPart_000_0004_01C2A212.4A6836D0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello,

 <= /span>

           &nbs= p;    Atul Here, I have one problem while accessing Database Records Or Recordset from stored procedure. Procedure is like this,<= /font>

 <= /span>

= CREATE FUNCTION b_function() RETURNS int4 AS '

= DECLARE

=    an_integer int4;

= BEGIN

=    select emp_id from employee;

=    return an_integer;

= END;

= '

= LANGUAGE 'plpgsql';

 <= /span>

I create the procedure . After that I run the statement like

 <= /span>

= Test=3D#> select b_function();

 <= /span>

Error comes like

 <= /span>

Er= ror: ERROR:  SELECT query has no destination for result data.

        &= nbsp;       If you want to discard the results, use PERFORM instead.

WA= RNING:  Error occurred while executing PL= /pgSQL function b_function

WA= RNING:  line 4 at SQL statement

 =

Also I use PERFORM statement. But still problem is not resolved.

 <= /span>

Please Help me. I hope your kind co-operation.

 <= /span>

Thanks.

 <= /span>

Atul…

------=_NextPart_000_0004_01C2A212.4A6836D0--