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
)
(
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
)
0 comments:
Post a Comment