Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Mathias
Posting Yak Master
119 Posts |
Posted - 2002-04-29 : 02:46:37
|
How could I query the result of an sp_ procedure?Example : use pubsexec sp_column_privileges @table_name='jobs' |
|
dsdeming
479 Posts |
Posted - 2002-04-29 : 07:59:41
|
You can always use INSERT INTO ... EXECUTE syntax:INSERT INTO mytableexec sp_column_privileges @table_name='jobs' Then you can query mytable as much as you'd like. |
|
|
Nazim
A custom title
1408 Posts |
Posted - 2002-04-29 : 08:26:04
|
If you are using Sql 7.0 this wouldnt work . you can try thisSELECT a.*FROM OPENROWSET('SQLOLEDB','servername';'sa';'password', 'exec mydatabase.dbo.sp_yoursp') AS aquote: You can always use INSERT INTO ... EXECUTE syntax:INSERT INTO mytableexec sp_column_privileges @table_name='jobs' Then you can query mytable as much as you'd like.
-------------------------------------------------------------- |
|
|
mohamedyousuff@yahoo.com
Starting Member
24 Posts |
Posted - 2002-04-29 : 08:37:03
|
I think User defined functions will perform better particularly if the stored procedure could be implemented as Inline User-Defined functions. Then you can query the output of the function like select * from MyFunction()S.Mohamed Yousuffquote: If you are using Sql 7.0 this wouldnt work . you can try thisSELECT a.*FROM OPENROWSET('SQLOLEDB','servername';'sa';'password', 'exec mydatabase.dbo.sp_yoursp') AS aquote: You can always use INSERT INTO ... EXECUTE syntax:INSERT INTO mytableexec sp_column_privileges @table_name='jobs' Then you can query mytable as much as you'd like.
--------------------------------------------------------------
|
|
|
Utpal
Posting Yak Master
179 Posts |
Posted - 2002-09-11 : 02:51:43
|
quote: you can try this SELECT a.* FROM OPENROWSET('SQLOLEDB','servername';'sa';'password', 'exec mydatabase.dbo.sp_yoursp')
I am trying to use this to open a cursor in a sp. But I don't want to hard code the user name and password. For user name I could use the SUSER_SNAME() function, what about password? Is there any function that returns the current user's password? |
|
|
|
|
|