This example show a simple working function call:
create function dbo.fn_call_stp ()
returns int
as
begin
return (
SELECT top (1) c
FROM OPENROWSET('SQLNCLI', 'Server=servername;Trusted_Connection=yes;',
'execute dbname.dbo.stp_call_from_udf') AS a)
end
There is a gotcha with function calls, if the return type is int(10) then returning a vanila int?
No comments:
Post a Comment