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 |
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2009-04-06 : 14:55:44
|
| I'm getting incorrect syntax near the word toDrop Table LastDiaryalter Table CurrentDiary to LastDiaryI want to drop the table LastDiary and change the name of CurrentDiary to LastDiary. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
JJ297
Aged Yak Warrior
940 Posts |
Posted - 2009-04-06 : 15:11:41
|
| Thanks got it:Drop Table "LastDiary"Exec sp_rename "Current", "LastDiary" |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2009-04-06 : 15:18:29
|
| If you have a sproc dropping the table, there's probably one creating it. WouldTRUNCATE TABLE LastDiaryINSERT INTO LastDiarySELECT <columns>FROM CurrentDiarywork?Jim |
 |
|
|
|
|
|