declare @StoreID int; set @StoreID = (select default_value from system_default where Default_Name = 'Main_store_Id'); declare @duplogid bigint; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =649161 and Trading_Day_ID = 124676 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =649161 and Trading_Day_ID =124676 and @StoreID=14 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =690622 and Trading_Day_ID = 124676 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =690622 and Trading_Day_ID =124676 and @StoreID=14 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =690659 and Trading_Day_ID = 124676 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =690659 and Trading_Day_ID =124676 and @StoreID=14 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =690748 and Trading_Day_ID = 124676 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =690748 and Trading_Day_ID =124676 and @StoreID=14 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1296483 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1296483 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1296484 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1296484 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1296491 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1296491 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1296529 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1296529 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1459773 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1459773 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531389 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531389 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531391 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531391 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531392 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531392 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531393 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531393 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531394 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531394 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531417 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531417 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531444 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531444 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531445 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531445 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1531455 and Trading_Day_ID = 204715 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1531455 and Trading_Day_ID =204715 and @StoreID=16 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810111 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810111 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810112 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810112 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810113 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810113 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810130 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810130 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810155 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810155 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810159 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810159 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810160 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810160 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810161 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810161 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810162 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810162 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810163 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810163 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1810167 and Trading_Day_ID = 544482 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1810167 and Trading_Day_ID =544482 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1904110 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1904110 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1904111 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1904111 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1904112 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1904112 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1904113 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1904113 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1904210 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1904210 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1905680 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1905680 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1915883 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1915883 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1927952 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1927952 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1929505 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1929505 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1929506 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1929506 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1929528 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1929528 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940742 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940742 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940769 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940769 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940770 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940770 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940785 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940785 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940786 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940786 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940792 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940792 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940795 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940795 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940801 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940801 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940833 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940833 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940834 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940834 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940847 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940847 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940860 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940860 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940862 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940862 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940871 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940871 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940872 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940872 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940880 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940880 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940890 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940890 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940891 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940891 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940900 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940900 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940908 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940908 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940911 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940911 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940912 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940912 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940913 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940913 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940915 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940915 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940925 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940925 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940951 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940951 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940965 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940965 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940966 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940966 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940970 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940970 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940971 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940971 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940972 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940972 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940973 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940973 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1940997 and Trading_Day_ID = 554680 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1940997 and Trading_Day_ID =554680 and @StoreID=23 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =257390 and Trading_Day_ID = 34481 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =257390 and Trading_Day_ID =34481 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =332463 and Trading_Day_ID = 34481 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =332463 and Trading_Day_ID =34481 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =332473 and Trading_Day_ID = 34481 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =332473 and Trading_Day_ID =34481 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =332479 and Trading_Day_ID = 34481 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =332479 and Trading_Day_ID =34481 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =394121 and Trading_Day_ID = 34525 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =394121 and Trading_Day_ID =34525 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =394123 and Trading_Day_ID = 34525 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =394123 and Trading_Day_ID =34525 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =394131 and Trading_Day_ID = 34525 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =394131 and Trading_Day_ID =34525 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =394143 and Trading_Day_ID = 34525 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =394143 and Trading_Day_ID =34525 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =394152 and Trading_Day_ID = 34525 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =394152 and Trading_Day_ID =34525 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =394153 and Trading_Day_ID = 34525 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =394153 and Trading_Day_ID =34525 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =394162 and Trading_Day_ID = 34525 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =394162 and Trading_Day_ID =34525 and @StoreID=29 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =971669 and Trading_Day_ID = 334312 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =971669 and Trading_Day_ID =334312 and @StoreID=51 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =971921 and Trading_Day_ID = 334312 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =971921 and Trading_Day_ID =334312 and @StoreID=51 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =971924 and Trading_Day_ID = 334312 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =971924 and Trading_Day_ID =334312 and @StoreID=51 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =971931 and Trading_Day_ID = 334312 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =971931 and Trading_Day_ID =334312 and @StoreID=51 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =971946 and Trading_Day_ID = 334312 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =971946 and Trading_Day_ID =334312 and @StoreID=51 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =971947 and Trading_Day_ID = 334312 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =971947 and Trading_Day_ID =334312 and @StoreID=51 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =981955 and Trading_Day_ID = 334312 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =981955 and Trading_Day_ID =334312 and @StoreID=51 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =981964 and Trading_Day_ID = 334312 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =981964 and Trading_Day_ID =334312 and @StoreID=51 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =904878 and Trading_Day_ID = 184499 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =904878 and Trading_Day_ID =184499 and @StoreID=55 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =996800 and Trading_Day_ID = 184499 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =996800 and Trading_Day_ID =184499 and @StoreID=55 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =996885 and Trading_Day_ID = 184499 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =996885 and Trading_Day_ID =184499 and @StoreID=55 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =996887 and Trading_Day_ID = 184499 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =996887 and Trading_Day_ID =184499 and @StoreID=55 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =996891 and Trading_Day_ID = 184499 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =996891 and Trading_Day_ID =184499 and @StoreID=55 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =996895 and Trading_Day_ID = 184499 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =996895 and Trading_Day_ID =184499 and @StoreID=55 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1056321 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1056321 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1280314 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1280314 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1280315 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1280315 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1761666 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1761666 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1761667 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1761667 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1882884 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1882884 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1893158 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1893158 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953943 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953943 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953953 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953953 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953957 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953957 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953958 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953958 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953959 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953959 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953960 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953960 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953961 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953961 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953962 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953962 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953978 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953978 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953979 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953979 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1953980 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1953980 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1963981 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1963981 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1963987 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1963987 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1973989 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1973989 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1973990 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1973990 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1973996 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1973996 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1973999 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1973999 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974000 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974000 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974001 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974001 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974003 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974003 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974009 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974009 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974083 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974083 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974087 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974087 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974093 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974093 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974098 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974098 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974099 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974099 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974100 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974100 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974101 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974101 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974102 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974102 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974103 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974103 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974104 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974104 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974105 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974105 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974106 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974106 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974107 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974107 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974108 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974108 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974109 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974109 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974110 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974110 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1974111 and Trading_Day_ID = 633928 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1974111 and Trading_Day_ID =633928 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2024640 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2024640 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2085241 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2085241 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2275575 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2275575 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2326257 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2326257 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2326332 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2326332 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2336420 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2336420 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2366928 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2366928 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2367043 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2367043 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2367110 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2367110 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2367165 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2367165 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2377187 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2377187 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2417199 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2417199 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2417206 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2417206 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2417207 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2417207 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2417209 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2417209 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2437205 and Trading_Day_ID = 814047 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2437205 and Trading_Day_ID =814047 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2457210 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2457210 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2487264 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2487264 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2537818 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2537818 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2547912 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2547912 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2547951 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2547951 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2557995 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2557995 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2557997 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2557997 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2558002 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2558002 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2558006 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2558006 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2558009 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2558009 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2558042 and Trading_Day_ID = 834080 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2558042 and Trading_Day_ID =834080 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2678534 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2678534 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2678535 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2678535 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2688566 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2688566 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2769026 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2769026 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2769036 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2769036 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779137 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779137 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779141 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779141 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779142 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779142 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779143 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779143 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779148 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779148 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779150 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779150 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779153 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779153 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779154 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779154 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779159 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779159 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779160 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779160 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779161 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779161 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779184 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779184 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779185 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779185 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779193 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779193 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779197 and Trading_Day_ID = 834132 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779197 and Trading_Day_ID =834132 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779233 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779233 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779236 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779236 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779238 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779238 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779239 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779239 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779242 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779242 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779243 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779243 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779245 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779245 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779253 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779253 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779254 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779254 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779257 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779257 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779258 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779258 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779259 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779259 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779260 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779260 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779266 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779266 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779267 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779267 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779275 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779275 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779287 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779287 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779289 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779289 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2779300 and Trading_Day_ID = 834135 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2779300 and Trading_Day_ID =834135 and @StoreID=57 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2560711 and Trading_Day_ID = 714620 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2560711 and Trading_Day_ID =714620 and @StoreID=60 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2560712 and Trading_Day_ID = 714620 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2560712 and Trading_Day_ID =714620 and @StoreID=60 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2560729 and Trading_Day_ID = 714620 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2560729 and Trading_Day_ID =714620 and @StoreID=60 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2592258 and Trading_Day_ID = 1313998 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2592258 and Trading_Day_ID =1313998 and @StoreID=66 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =212809 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =212809 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =212811 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =212811 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =212840 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =212840 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =216534 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =216534 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =216544 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =216544 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =217899 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =217899 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =218205 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =218205 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =229182 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =229182 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =229243 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =229243 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =229262 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =229262 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =229273 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =229273 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239258 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239258 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239278 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239278 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239283 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239283 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239289 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239289 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239294 and Trading_Day_ID = 13757 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239294 and Trading_Day_ID =13757 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239590 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239590 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239597 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239597 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239604 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239604 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239619 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239619 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239620 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239620 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239621 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239621 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239622 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239622 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239623 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239623 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239624 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239624 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239625 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239625 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239626 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239626 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239629 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239629 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =239630 and Trading_Day_ID = 13763 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =239630 and Trading_Day_ID =13763 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1054223 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1054223 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1057105 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1057105 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1057106 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1057106 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1057107 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1057107 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1057108 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1057108 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1058322 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1058322 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1058323 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1058323 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059841 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059841 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059845 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059845 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059855 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059855 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059861 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059861 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059866 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059866 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059871 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059871 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059873 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059873 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059874 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059874 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1059887 and Trading_Day_ID = 133975 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1059887 and Trading_Day_ID =133975 and @StoreID=72 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =981755 and Trading_Day_ID = 504093 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =981755 and Trading_Day_ID =504093 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1033177 and Trading_Day_ID = 504093 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1033177 and Trading_Day_ID =504093 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1033178 and Trading_Day_ID = 504093 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1033178 and Trading_Day_ID =504093 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1034570 and Trading_Day_ID = 504093 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1034570 and Trading_Day_ID =504093 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1145356 and Trading_Day_ID = 504093 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1145356 and Trading_Day_ID =504093 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1155376 and Trading_Day_ID = 504093 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1155376 and Trading_Day_ID =504093 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1155383 and Trading_Day_ID = 504093 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1155383 and Trading_Day_ID =504093 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1155386 and Trading_Day_ID = 504093 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1155386 and Trading_Day_ID =504093 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1185534 and Trading_Day_ID = 514126 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1185534 and Trading_Day_ID =514126 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1205574 and Trading_Day_ID = 524157 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1205574 and Trading_Day_ID =524157 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1436040 and Trading_Day_ID = 514126 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1436040 and Trading_Day_ID =514126 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1436041 and Trading_Day_ID = 514126 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1436041 and Trading_Day_ID =514126 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1436042 and Trading_Day_ID = 514126 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1436042 and Trading_Day_ID =514126 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1436043 and Trading_Day_ID = 514126 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1436043 and Trading_Day_ID =514126 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1436044 and Trading_Day_ID = 514126 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1436044 and Trading_Day_ID =514126 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1436047 and Trading_Day_ID = 514126 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1436047 and Trading_Day_ID =514126 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1626640 and Trading_Day_ID = 524157 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1626640 and Trading_Day_ID =524157 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1626711 and Trading_Day_ID = 524157 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1626711 and Trading_Day_ID =524157 and @StoreID=79 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2457281 and Trading_Day_ID = 494217 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2457281 and Trading_Day_ID =494217 and @StoreID=81 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2637653 and Trading_Day_ID = 494217 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2637653 and Trading_Day_ID =494217 and @StoreID=81 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2637654 and Trading_Day_ID = 494217 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2637654 and Trading_Day_ID =494217 and @StoreID=81 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2667696 and Trading_Day_ID = 494217 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2667696 and Trading_Day_ID =494217 and @StoreID=81 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2667712 and Trading_Day_ID = 494217 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2667712 and Trading_Day_ID =494217 and @StoreID=81 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2667737 and Trading_Day_ID = 494217 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2667737 and Trading_Day_ID =494217 and @StoreID=81 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2667746 and Trading_Day_ID = 494217 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2667746 and Trading_Day_ID =494217 and @StoreID=81 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2667760 and Trading_Day_ID = 494217 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2667760 and Trading_Day_ID =494217 and @StoreID=81 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1280089 and Trading_Day_ID = 562431 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1280089 and Trading_Day_ID =562431 and @StoreID=91 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1280101 and Trading_Day_ID = 562431 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1280101 and Trading_Day_ID =562431 and @StoreID=91 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1280116 and Trading_Day_ID = 562431 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1280116 and Trading_Day_ID =562431 and @StoreID=91 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1280117 and Trading_Day_ID = 562431 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1280117 and Trading_Day_ID =562431 and @StoreID=91 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =296871 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =296871 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =306878 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =306878 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =306885 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =306885 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =307525 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =307525 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =307526 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =307526 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =307527 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =307527 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =328299 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =328299 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =328327 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =328327 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =339242 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =339242 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =339246 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =339246 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =339280 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =339280 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =339316 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =339316 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340025 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340025 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340027 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340027 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340039 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340039 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340040 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340040 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340044 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340044 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340046 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340046 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340048 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340048 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340103 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340103 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =340108 and Trading_Day_ID = 64611 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =340108 and Trading_Day_ID =64611 and @StoreID=98 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =210323 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =210323 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =210356 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =210356 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =231181 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =231181 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =232179 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =232179 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =232356 and Trading_Day_ID = 4378 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =232356 and Trading_Day_ID =4378 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =234196 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =234196 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245064 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245064 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245065 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245065 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245085 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245085 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245086 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245086 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245089 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245089 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245090 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245090 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245092 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245092 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245093 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245093 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245094 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245094 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245095 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245095 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245107 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245107 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245113 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245113 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245114 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245114 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245115 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245115 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245117 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245117 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245120 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245120 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245125 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245125 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245132 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245132 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =245133 and Trading_Day_ID = 4459 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =245133 and Trading_Day_ID =4459 and @StoreID=105 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1886694 and Trading_Day_ID = 844146 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1886694 and Trading_Day_ID =844146 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2477556 and Trading_Day_ID = 844169 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2477556 and Trading_Day_ID =844169 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2707981 and Trading_Day_ID = 844164 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2707981 and Trading_Day_ID =844164 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2707988 and Trading_Day_ID = 844164 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2707988 and Trading_Day_ID =844164 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2798036 and Trading_Day_ID = 844169 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2798036 and Trading_Day_ID =844169 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2958346 and Trading_Day_ID = 844164 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2958346 and Trading_Day_ID =844164 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2958387 and Trading_Day_ID = 844167 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2958387 and Trading_Day_ID =844167 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2979091 and Trading_Day_ID = 844164 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2979091 and Trading_Day_ID =844164 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009253 and Trading_Day_ID = 844169 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009253 and Trading_Day_ID =844169 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009452 and Trading_Day_ID = 844146 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009452 and Trading_Day_ID =844146 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009460 and Trading_Day_ID = 844146 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009460 and Trading_Day_ID =844146 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009590 and Trading_Day_ID = 844153 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009590 and Trading_Day_ID =844153 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009591 and Trading_Day_ID = 844153 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009591 and Trading_Day_ID =844153 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009788 and Trading_Day_ID = 844162 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009788 and Trading_Day_ID =844162 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009790 and Trading_Day_ID = 844162 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009790 and Trading_Day_ID =844162 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009797 and Trading_Day_ID = 844162 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009797 and Trading_Day_ID =844162 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009798 and Trading_Day_ID = 844162 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009798 and Trading_Day_ID =844162 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3009807 and Trading_Day_ID = 844162 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3009807 and Trading_Day_ID =844162 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3019833 and Trading_Day_ID = 844164 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3019833 and Trading_Day_ID =844164 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3029847 and Trading_Day_ID = 844164 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3029847 and Trading_Day_ID =844164 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3029899 and Trading_Day_ID = 844167 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3029899 and Trading_Day_ID =844167 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3029919 and Trading_Day_ID = 844167 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3029919 and Trading_Day_ID =844167 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3029987 and Trading_Day_ID = 844169 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3029987 and Trading_Day_ID =844169 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3029993 and Trading_Day_ID = 844169 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3029993 and Trading_Day_ID =844169 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3029997 and Trading_Day_ID = 844169 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3029997 and Trading_Day_ID =844169 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3030011 and Trading_Day_ID = 844169 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3030011 and Trading_Day_ID =844169 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3040597 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3040597 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3040603 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3040603 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3051224 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3051224 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3051225 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3051225 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3051231 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3051231 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3051235 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3051235 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3051236 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3051236 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3051238 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3051238 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =3051240 and Trading_Day_ID = 844225 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =3051240 and Trading_Day_ID =844225 and @StoreID=116 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =450223 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =450223 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =504940 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =504940 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505005 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505005 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505006 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505006 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505007 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505007 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505008 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505008 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505009 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505009 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505010 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505010 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505016 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505016 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505063 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505063 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505072 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505072 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505093 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505093 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505101 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505101 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505102 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505102 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505103 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505103 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505107 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505107 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505116 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505116 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505117 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505117 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505121 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505121 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505122 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505122 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =505124 and Trading_Day_ID = 113985 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =505124 and Trading_Day_ID =113985 and @StoreID=153 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4525343 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4525343 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4526830 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4526830 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4527783 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4527783 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4527784 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4527784 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4527785 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4527785 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4548323 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4548323 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4548596 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4548596 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4548639 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4548639 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4559282 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4559282 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4559313 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4559313 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4559429 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4559429 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4559438 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4559438 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4559443 and Trading_Day_ID = 1054149 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4559443 and Trading_Day_ID =1054149 and @StoreID=161 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1425533 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1425533 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1425699 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1425699 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1425700 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1425700 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1437545 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1437545 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1437654 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1437654 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1488580 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1488580 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1508644 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1508644 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1699781 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1699781 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1790697 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1790697 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1790715 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1790715 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1790720 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1790720 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1820760 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1820760 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1820761 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1820761 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1820819 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1820819 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1820828 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1820828 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1820830 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1820830 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1820834 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1820834 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1830827 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1830827 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1840825 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1840825 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1840845 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1840845 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1840855 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1840855 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1850862 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1850862 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1850871 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1850871 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1850875 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1850875 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1900891 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1900891 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1900892 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1900892 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1900905 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1900905 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1900906 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1900906 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1900919 and Trading_Day_ID = 453709 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1900919 and Trading_Day_ID =453709 and @StoreID=190 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =4389075 and Trading_Day_ID = 1432913 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =4389075 and Trading_Day_ID =1432913 and @StoreID=193 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =5761720 and Trading_Day_ID = 1443083 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =5761720 and Trading_Day_ID =1443083 and @StoreID=193 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =5772298 and Trading_Day_ID = 1443083 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =5772298 and Trading_Day_ID =1443083 and @StoreID=193 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =5783544 and Trading_Day_ID = 1443083 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =5783544 and Trading_Day_ID =1443083 and @StoreID=193 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =5783566 and Trading_Day_ID = 1443083 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =5783566 and Trading_Day_ID =1443083 and @StoreID=193 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =241897 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =241897 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =243502 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =243502 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =254685 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =254685 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =265791 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =265791 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =286683 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =286683 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =286686 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =286686 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =286701 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =286701 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =286712 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =286712 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =286717 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =286717 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =286739 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =286739 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =286740 and Trading_Day_ID = 53021 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =286740 and Trading_Day_ID =53021 and @StoreID=201 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2826448 and Trading_Day_ID = 502864 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2826448 and Trading_Day_ID =502864 and @StoreID=202 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2886971 and Trading_Day_ID = 502864 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2886971 and Trading_Day_ID =502864 and @StoreID=202 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2264392 and Trading_Day_ID = 712470 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2264392 and Trading_Day_ID =712470 and @StoreID=203 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2264434 and Trading_Day_ID = 712470 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2264434 and Trading_Day_ID =712470 and @StoreID=203 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2264435 and Trading_Day_ID = 712470 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2264435 and Trading_Day_ID =712470 and @StoreID=203 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2314756 and Trading_Day_ID = 712394 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2314756 and Trading_Day_ID =712394 and @StoreID=203 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2314758 and Trading_Day_ID = 712394 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2314758 and Trading_Day_ID =712394 and @StoreID=203 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2328724 and Trading_Day_ID = 712470 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2328724 and Trading_Day_ID =712470 and @StoreID=203 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =2328746 and Trading_Day_ID = 712470 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =2328746 and Trading_Day_ID =712470 and @StoreID=203 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =164934 and Trading_Day_ID = 22233 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =164934 and Trading_Day_ID =22233 and @StoreID=225 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =165328 and Trading_Day_ID = 22233 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =165328 and Trading_Day_ID =22233 and @StoreID=225 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =165330 and Trading_Day_ID = 22233 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =165330 and Trading_Day_ID =22233 and @StoreID=225 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =165331 and Trading_Day_ID = 22233 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =165331 and Trading_Day_ID =22233 and @StoreID=225 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =165337 and Trading_Day_ID = 22233 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =165337 and Trading_Day_ID =22233 and @StoreID=225 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =33013 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =33013 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =33049 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =33049 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =33069 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =33069 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =33688 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =33688 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =35872 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =35872 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =35891 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =35891 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =35892 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =35892 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =36058 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =36058 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =46324 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =46324 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =46337 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =46337 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =76379 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =76379 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =146608 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =146608 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =166685 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =166685 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =176708 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =176708 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =186707 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =186707 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =196798 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =196798 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =196858 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =196858 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =206893 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =206893 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =206894 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =206894 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =216940 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =216940 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =216949 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =216949 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =216956 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =216956 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =226952 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =226952 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =226962 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =226962 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =246975 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =246975 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =246978 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =246978 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =277022 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =277022 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =297038 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =297038 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =307092 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =307092 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =307097 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =307097 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =327120 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =327120 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =377162 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =377162 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =377163 and Trading_Day_ID = 131584 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =377163 and Trading_Day_ID =131584 and @StoreID=233 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =362811 and Trading_Day_ID = 261795 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =362811 and Trading_Day_ID =261795 and @StoreID=235 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =420249 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =420249 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =480766 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =480766 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =480767 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =480767 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =480772 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =480772 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =480776 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =480776 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =480780 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =480780 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =480781 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =480781 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =490779 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =490779 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =490781 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =490781 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =490784 and Trading_Day_ID = 251407 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =490784 and Trading_Day_ID =251407 and @StoreID=241 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =27465 and Trading_Day_ID = 10831 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =27465 and Trading_Day_ID =10831 and @StoreID=264 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =27485 and Trading_Day_ID = 10831 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =27485 and Trading_Day_ID =10831 and @StoreID=264 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =27488 and Trading_Day_ID = 10831 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =27488 and Trading_Day_ID =10831 and @StoreID=264 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =27489 and Trading_Day_ID = 10831 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =27489 and Trading_Day_ID =10831 and @StoreID=264 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =27490 and Trading_Day_ID = 10831 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =27490 and Trading_Day_ID =10831 and @StoreID=264 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =27586 and Trading_Day_ID = 10831 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =27586 and Trading_Day_ID =10831 and @StoreID=264 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1236188 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1236188 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1436797 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1436797 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1677071 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1677071 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1707364 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1707364 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1707369 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1707369 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1707379 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1707379 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1707385 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1707385 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1707389 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1707389 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0; select @duplogid = (select top(1) SSB_Conversion_Log_ID from SSB_Conversion_Log where Stock_Item_ID =1707392 and Trading_Day_ID = 1010736 and isReversal = 0 order by LogDateTime asc); delete from SSB_Conversion_Log where SSB_Conversion_Log_ID <> @duplogid and Stock_Item_ID =1707392 and Trading_Day_ID =1010736 and @StoreID=282 and isReversal = 0;