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 |
|
nemohm
Yak Posting Veteran
69 Posts |
Posted - 2003-05-01 : 16:32:38
|
| Hi,I have a new table that is generated every day, and these tables always have the same definition.How can I specify the name of the table at runtime?Dynamic SQL is the tool?How to implement it when the name of the table is in sysobjects, and need everything from a table created yesterday?Select *From (SELECT name FROM sysobjects WHERE crdate>DATEADD(day, -1,GETDATE())The subquery returns the right table name. (I’m not familiar with dynamic SQL, neither with advanced SQL)Thx,Dobby |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-05-01 : 16:45:04
|
| Please do not post in multiple forums:[url]http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=25869[/url]Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-05-01 : 16:46:33
|
| Go Tara GoGo Tara GoBrett8-) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-05-01 : 16:48:23
|
quote: Go Tara GoGo Tara GoBrett8-)
Tara |
 |
|
|
|
|
|