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 |
memarcie
Yak Posting Veteran
91 Posts |
Posted - 2008-01-04 : 09:50:52
|
Can I append a date into a table name ?Such as: select field1 into feeschedule_mmddyyyyfrom feescheduleswhere mmddyyyy is the current date.Is this possible and how?Thanks,Marcie |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-01-04 : 09:54:18
|
You mean while creating table?Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
memarcie
Yak Posting Veteran
91 Posts |
Posted - 2008-01-04 : 09:56:07
|
yes while creating the temporary table |
 |
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2008-01-04 : 10:06:24
|
Yes but only using dynamic sql like this:declare @a varchar(2000)set @a = 'select * into dbo.tbl' + convert(varchar(10), getdate(), 112) + ' from sometable'exec(@a) Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED" |
 |
|
|
|
|