set ANSI_NULLS ON set QUOTED_IDENTIFIER ON SET IDENTITY_INSERT tbTransactionItem_partitioned ON GO INSERT INTO [dbo].[tbTransactionItem_partitioned] (TransactionItemID ,[EntityID] ,[ItemID] ,[Quantity] ,[TransactionTime] ,[InventoryCost] ,[TransactionSalesItemID] ,[InventoryUnit] ,[BusinessDay] ,[Aggregated] ,[RevenueCentreID]) select top 5000000 TransactionItemID ,[EntityID] ,[ItemID] ,[Quantity] ,[TransactionTime] ,[InventoryCost] ,[TransactionSalesItemID] ,[InventoryUnit] ,[BusinessDay] ,[Aggregated] ,[RevenueCentreID] from tbtransactionitem select count (*) from [tbTransactionItem_partitioned] truncate table [tbTransactionItem_partitioned]