Hello,
I have the following table / values:
create table #temp (counter int, imageid int, newpage int)
insert into #temp values (1,400, 1)
insert into #temp values (2,400, NULL)
insert into #temp values (3,400, NULL)
insert into #temp values (4,400, NULL)
insert into #temp values (5,400...