August 20, 2010 at 10:40 pm
Incorrect syntax near '-'. [SQLSTATE 42000] (Error 102) Incorrect syntax near 'records'. [SQLSTATE 42000] (Error 102). The step failed.
Here is the script
--Script to delete the records from table in batches of 100 everynight
SET NOCOUNT ON
Declare @batchsize int
Set @batchsize = 100
while @batchsize > 0 and DATEPART(hour, GETDATE()) < 6
begin
delete top (@batchsize) from
WebFramework.dbo.aspnet_WebEvent_Events
set @batchsize = @@rowcount
WAITFOR DELAY '00:00:00.250'
end
August 21, 2010 at 12:09 am
Is there any other step in the job?
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
August 21, 2010 at 5:24 am
No there is no other step.
I just took out the script and ran on server, its working fine .
I really dont understand what the exact problem is.....
August 21, 2010 at 5:45 am
Please script out the job and paste the content here
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
August 21, 2010 at 5:47 am
Its working fine now.
Thanks for your help
August 21, 2010 at 5:57 am
Curious to know, what changed?
Pradeep Adiga
Blog: sqldbadiaries.com
Twitter: @pradeepadiga
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply