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 |
|
neo151
Starting Member
1 Post |
Posted - 2010-11-30 : 00:04:11
|
| Hi plaese help me on this.I need to write a sql procedure which run after a specific time and check a particular table in database.if the entries are greater than a specified number. the procedureitself create a new table which contain the all data of the same table and after creation of new table the old data in the current table should be deleted. |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-11-30 : 02:20:34
|
| Do you want this?Create Procedure get_backupasBeginif((Select count(1) from table_name)> 100)Begininsert into temp_table_nameSelect * from table_nameTruncate table table_nameEndEndSenthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
|
|
|