• ishaan99 (12/8/2008)


    Has anyone tried calling a stored procdure from a user defined function. I have a procedure as Proc_XXX with 7 parameters if i do exec Proc_XXX(null,null,null,null,null,'1/1/1998','1/1/2007') i am getting the result set. Is it possible to have the same results when calling thru a function .

    call Proc_XXX(null,null,null,null,null,'1/1/1998','1/1/2007')

    any help on this will be greatly appreciated. TIA

    Not sure how you feel about calling functions from functions but you could create this

    Func_XXX(.....) Insert current proc code here making the proc a proper function

    Proc_XXX(.....) Select * From Func_XXX(....)

    Use Func_XXX from your other function.