Hi,
Sorry but I do not understand what you said.
Doing a test with the script below got 4 rows in the result:
declare @ITEM Table
(ITEMID INT, ITEMREFERENCEID INT);
insert into @ITEM values
(1, 48),
(2, 50),
(3, 51),
(4, 52),
(5, 53),
(6, 54),
(7, 55),
(8, 56),
(9, 57),
(10, 58),
(11, 59)...