Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a function in oracle which returns a varchar result. now i want to use this result as parameter to call another stored PROC. how can i do this....?
any help is appreciated.. :)
thanks in advance
Posted
Comments
Bala Selvanayagam 8-Nov-11 6:48am    
What is your function input and outpur paramters and explain with some sample data

1 solution

It's my written Function for return loan scheme name from oracle database
i think it's help you to solve your problem:
SQL
CREATE OR REPLACE FUNCTION GETACNAME (Vscheme IN VARCHAR2 , Vacno IN NUMBER)
RETURN VARCHAR2 IS   
 	VAcName  		VARCHAR2(200);   
	AcNoType		VARCHAR2(2);   
BEGIN   
	
	SELECT S_ACNOTYPE INTO AcNoType FROM SCHEMAST WHERE S_APPL = Vscheme ;   
	
	If AcNoType = 'TD' Or AcNoType = 'SB' Or AcNoType = 'CA' Or AcNoType = 'AG' Or AcNoType = 'GS' Or AcNoType = 'IV' Or AcNoType = 'LK' Then
	 	SELECT  AC_NAME Into VAcName FROM DPMaster    
		WHERE	Ac_AcNoType = AcNoType
			And AC_TYPE = Vscheme
			And AC_NO = Vacno     ;   
		
	End If;   

 RETURN VAcName ;

 END GETACNAME ;
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900