Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 8F333476D57 for ; Thu, 12 Dec 2002 09:33:40 -0500 (EST) Received: from ns2.imcindia.net (unknown [203.129.231.83]) by postgresql.org (Postfix) with ESMTP id A101947638A for ; Thu, 12 Dec 2002 09:33:22 -0500 (EST) Received: from virgo ([203.129.231.85]) by ns2.imcindia.net (8.9.3/8.9.3) with SMTP id UAA30828 for ; Thu, 12 Dec 2002 20:16:04 +0530 From: "Atul" To: Subject: Re: Stored Procedure Problem Date: Thu, 12 Dec 2002 20:13:22 +0530 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000A_01C2A21A.EBA28020" 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/158 X-Sequence-Number: 10746 This is a multi-part message in MIME format. ------=_NextPart_000_000A_01C2A21A.EBA28020 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Hi, How to return multiple columns through stored procedure. Consider EX. CREATE FUNCTION b_function() RETURNS varchar AS ' DECLARE an_integer int4; an_name varchar; BEGIN select into an_integer emp_id,an_name emp_name from employee; return an_integer,an_name; END; ' LANGUAGE 'plpgsql'; But This Gives Error(For Multiple column , not for single column) Please Let me know. Thanks Atul… ------=_NextPart_000_000A_01C2A21A.EBA28020 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hi,

  &nbs= p;   How to return multiple columns through stored procedure.

 

Consider EX.

 

CREATE FUN= CTION b_function() RETURNS varchar AS '

 DECLARE

    an_integer int4;

    an_name    varchar;

 BEGIN

    select into an_integer emp_id,an_name emp_name from employee;

    return an_integer,an_= name;

 END;

 '

 LANGUAGE 'plpgsql';<= font size=3D2 color=3Dblack face=3D"Courier New">

 <= /span>

But This Gives Error(For Multiple column , not for single column)

Please Let me know.

 <= /span>

Thanks

 <= /span>

Atul…

------=_NextPart_000_000A_01C2A21A.EBA28020--