CREATE
PROC
p_test
as
SELECT GETDATE () a
go
CREATE VIEW v_test
AS
SELECT * FROM OPENROWSET ( ' SQLOLEDB.1 ' , ' server=FI6/SQL2008;uid=sa;pwd=123 ' , ' exec test11.dbo.p_test ' )
go
SELECT * FROM V_TEST
/*
a
2009-09-01 11:08:30.197
*/
CREATE FUNCTION FN_TEST()
RETURNS TABLE
AS
RETURN (
SELECT * FROM OPENROWSET ( ' SQLOLEDB.1 ' , ' server=FI6/SQL2008;uid=sa;pwd=123 ' , ' exec test11.dbo.p_test ' )
)
go
SELECT * FROM FN_TEST()
/*
a
2009-09-01 11:08:30.197
*/
as
SELECT GETDATE () a
go
CREATE VIEW v_test
AS
SELECT * FROM OPENROWSET ( ' SQLOLEDB.1 ' , ' server=FI6/SQL2008;uid=sa;pwd=123 ' , ' exec test11.dbo.p_test ' )
go
SELECT * FROM V_TEST
/*
a
2009-09-01 11:08:30.197
*/
CREATE FUNCTION FN_TEST()
RETURNS TABLE
AS
RETURN (
SELECT * FROM OPENROWSET ( ' SQLOLEDB.1 ' , ' server=FI6/SQL2008;uid=sa;pwd=123 ' , ' exec test11.dbo.p_test ' )
)
go
SELECT * FROM FN_TEST()
/*
a
2009-09-01 11:08:30.197
*/