cancel
Showing results for 
Search instead for 
Did you mean: 

stored procedure with out put parameters

Former Member
0 Kudos

create type ANJALI.PRODUCT1 As table(

ProductID varchar(10),ProductName varchar(50),

color varchar(30)

);

create procedure ANJALI.USPCOLOR(in p_color varchar(50),out p_tab "ANJALI"."PRODUCT1" )

As

Begin

p_tab:=select ProductName,color from ANJALI.PRODUCT1

where color=:p_color;

end;

the error in this plz rectify this error

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Anjali

Repalce the select statement with below one

p_tab  = select ProductID,ProductName,color from <tablename>;

Your table type have 3 columns ,but your select statement had only 2 ,also the syntax is p_tab = <statement> .

I also have attched the correct code

Regards,

Priyanka

Former Member
0 Kudos

Hi Anjali,

Did this solution worked for you? Please mark it as correct answer if it worked for you.

If you came across some other issues reply to this thread so that it will help us also to understnad things better

Regards

Priyanka