December 18, 2001 at 4:42 am
Hello,
If you have a stored procedure like:
create proc testProc
as
select * from myTable
Is there a way of executing that via a select statement rather than just exec?
e.g. The following doesn't work, but shows the idea of what I'm after:
select * from (exec testProc) where id = 1
i.e. Selecting from the result set of the stored procedure without altering the procedure itself and without using parameters
Thanks for any help, can't find it anywhere.
December 18, 2001 at 4:47 am
UDFs (user defined functions) could be used instead of sps. Alternatively (and less preferably) OpenDataSource or OpenRowSet would work.
Paul Ibison
Paul Ibison
Paul.Ibison@replicationanswers.com
December 18, 2001 at 8:52 am
Or you could just put the result into a temp table before the query.
Cursors never.
DTS - only when needed and never to control.
December 18, 2001 at 9:57 am
August 22, 2002 at 5:04 am
One of the limitations of Functions is that they cannot store data in permanent tables.
Is this the case also with OPENDATASOURCE and OPENROWSET?
My pre-lim enquiries suggest that this you cannot do this.
Many thanks for comments / suggestions
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply