Skip to main content

SELECT records from STORED PROCEDURE

find a way to select from SPROC, using OPENROWSET

SELECT * FROM OPENROWSET(SQLOLEDB', 'Trusted_Connection=Yes;Server=(local);Database=myDB',
'exec SPROC_NAME ''Param_1'', ''Param_1''')


or

SELECT * FROM OPENROWSET(SQLOLEDB', 'Trusted_Connection=No;Server=(local);Database=myDB;uid=user_id;pwd=password',
'exec SPROC_NAME ''Param_1'', ''Param_1''')


PS: change the server and database, sproc_name, uid, pwd to your need

until then

Comments