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 |
|
daman
Yak Posting Veteran
72 Posts |
Posted - 2008-07-17 : 16:00:11
|
| My current method of doing this task is1) create temp table and populate it with a sprocCREATE TABLE TEMP (MY_DATE DATETIME)INSERT INTO TEMPexec usp_get_available_dates @start_date,@end_date2) Now select from that temp tableSELECT value from DATA_TABLE WHERE date IN (select * from TEMP)My question is if it's possible to skip the TEMP table and select directly instead. For exampleSELECT value from DATA_TABLE WHERE date IN (exec usp_get_available_dates @start_date,@end_date) |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2008-07-17 : 16:04:04
|
| no, but you could make your get_available_dates a table valued function then JOIN to it.Be One with the OptimizerTG |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|