PROBLEM
How to call a stored procedure from a user defined function In SQL 2000
SOLUTION
Either you need to modify your stored procedure to be a user defined function or the other way around.
One crude way to achieve what you are looking for is to have your exec statement in a batch script and call that batch script from your function. Something like this -
create function <functionName>
exec master.sys.xp_cmpshell 'C:\storedProc.bat'
....
....
return @return
endMore on xp_cmpshell - http://msdn.microsoft.com/en-us/library/aa260689(SQL.80).aspx
I hope this helps.
No comments:
Post a Comment