In 7.3 you can ,
in follwoing steps,
1. do a CREATE TYPE (i would recommend to use a sperate schema for storing user
defined types)
2. in plpgsql declare the RECORD of that type .
3. populate the record varible according to your business logic and return the RECORD
using RETURN statements.
On Thu, Dec 12, 2002 at 08:13:22PM +0530, Atul wrote:
> Hi,
> How to return multiple columns through stored procedure.
> But This Gives Error(For Multiple column , not for single column)
> Please Let me know.
You didn't say which version of PostgreSQL you are using.
In PG 7.2 you can re
Atul wrote:
CREATE FUNCTION b_function() RETURNS varchar AS '
DECLARE
an_integer int4;
an_namevarchar;
BEGIN
select into an_integer emp_id,an_name emp_name from employee;
return an_integer,an_name;
END;
'
First: select into an_integer,an_name emp_id,emp_name...
S
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_integ
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 <[EMAIL PROTECTED]> escribió: > Hello,
>
> Atul Here, I have one
> CREATE FUNCTION b_function() RETURNS int4 AS '
> DECLARE
>an_integer int4;
> BEGIN
>select emp_id from employee;
>return an_integer;
> END;
> '
> LANGUAGE 'plpgsql';
>
Try
SELECT INTO an_integer emp_id from employee;
Regards, Christoph
---(end of broadcast)-
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_intege