Viewing 2 posts - 1 through 3 (of 3 total)
I'm still not certain why you would find all the maxes. Wouldn't you want something like this?
If OBJECT_ID('tempdb..#EditLog') is not null
Drop table #EditLog
Create table #EditLog (
Id int identity not null,...
April 28, 2015 at 9:55 am
#1793994
Aside of what Gail has already mentioned, the other reason for your error is
DECLARE @EditLog_CURSOR CURSOR FOR
is bad, it should be
DECLARE @EditLog_CURSOR CURSOR
SET @EditLog_CURSOR = CURSOR FOR
SELECT EL.Id
I...
April 28, 2015 at 9:48 am
#1793988