Viewing 6 posts - 1 through 6 (of 6 total)
Wow! That worked great. Thanks. I think I tried everyting except putting the Delete From & Where as Command1. I am going to run some tests on to see how...
June 11, 2008 at 3:27 pm
exec sp_MSforeachtable
@command1 = 'DELETE FROM ? ',
@whereand = '(TSTAMP < ''2007-01-01 00:00:00'')'
Results the same:
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near 'TSTAMP'.
June 11, 2008 at 11:49 am
When executing query:
exec sp_MSforeachtable
@command1 = 'DELETE FROM',
@whereand = '(TSTAMP < '2007-01-01 00:00:00')'
I receive this error message:
Server: Msg 170, Level 15, State 1, Line 3
Line 3: Incorrect syntax near...
June 11, 2008 at 11:29 am
Thanks for the help. I will be testing out different options on a backup server to see what works the best.
June 6, 2008 at 9:06 am
So after looking around sp_MSforeachtable here is what I came up with:
exec sp_MSforeachtable
@command1 = 'DELETE FROM',
@whereand = '(TSTAMP < '2007-01-01 00:00:00')'
June 5, 2008 at 2:54 pm
Sounds like I need to read about cursor / loops. I am also researching sys.sp_MSforeachtable.
June 5, 2008 at 2:31 pm
Viewing 6 posts - 1 through 6 (of 6 total)