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 |
mikebird
Aged Yak Warrior
529 Posts |
Posted - 2008-10-21 : 12:00:30
|
If I run an SP like this:exec epex3 '08-09-01', '08-10-31'what can I do with the output? I know the final statement might be a SELECT or a PRINT and I'll see a message or a table but when I see the outcoming table, how do I run again with a WHERE clause, as you do when developing a SELECT query? Can I treat the EXEC statement above as a table and add a WHERE to it? I think not.SELECT colunmx FROM ( exec epex3 '08-09-01', '08-10-31' )is invalid, yes? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-10-21 : 13:05:21
|
or you can even use table valued UDFs instead of stored procedures in which case you can use them in select queries just like a table with WHERE conditions and also join other tables. the syntax will be likeSELECT colunmx FROM dbo.epex3('08-09-01', '08-10-31') |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|