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 |
|
ashraff87
Starting Member
17 Posts |
Posted - 2008-07-28 : 08:06:55
|
| Hi, i want to run two stored procedures and compare the outcome of the two using EXCEPT. but to do this i beleive ill have to have them both in the form of a select statment, since putting EXCEPT inbetween my two Exec statments just doesnt work.So how is it possible to do say the following:SELECT * FROM (EXEC @return_value = [dbo].[Spr] @DATE = '12/05/2008') |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-07-28 : 08:12:59
|
Yes, You can make a LINKED SERVER to point to yourself and use OPENROWSET, OPENDATASOURCE or similar. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-28 : 08:30:26
|
| http://sqlblogcasts.com/blogs/madhivanan/archive/2007/11/26/select-columns-from-exec-procedure-name-is-this-possible.aspx |
 |
|
|
VGuyz
Posting Yak Master
121 Posts |
Posted - 2008-07-28 : 08:31:49
|
| its better u can prefer inline function instead of stored procedure.can u tell me the need for using a stored procedure in Select statement |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-07-28 : 10:32:22
|
quote: Originally posted by VGuyz its better u can prefer inline function instead of stored procedure.can u tell me the need for using a stored procedure in Select statement
i too agree to that. UDFs have much more usability than stored procedures. they can be used select,where,.. part of statements. |
 |
|
|
|
|
|