Live Traffic Feed

Friday, May 1, 2015

call store procedure from function in sql server

Leave a Comment
Function dbo.yourFunctionName
(
yourPara
)
RETURN TABLE
AS
RETURN
(
SELECT * FROM OPENROWSET('SQLNCLI','Server=yourServerName;UID=yourUserName;Pwd=yourPassword;','SET FMTONLY OFF; EXEC yourDataBase.dbo.yourSpName @yourPara') as C
)
If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment