右键单击FactInternetSales > 分区。
创建如下分区:
FactInternetSales2010。SQL:
SELECT [dbo].[FactInternetSales].[ProductKey], [dbo].[FactInternetSales].[CustomerKey], [dbo].[FactInternetSales].[PromotionKey], [dbo].[FactInternetSales].[CurrencyKey], [dbo].[FactInternetSales].[SalesTerritoryKey], [dbo].[FactInternetSales].[SalesOrderNumber], [dbo].[FactInternetSales].[SalesOrderLineNumber], [dbo].[FactInternetSales].[RevisionNumber], [dbo].[FactInternetSales].[OrderQuantity], [dbo].[FactInternetSales].[UnitPrice], [dbo].[FactInternetSales].[ExtendedAmount], [dbo].[FactInternetSales].[UnitPriceDiscountPct], [dbo].[FactInternetSales].[DiscountAmount], [dbo].[FactInternetSales].[ProductStandardCost], [dbo].[FactInternetSales].[TotalProductCost], [dbo].[FactInternetSales].[SalesAmount], [dbo].[FactInternetSales].[TaxAmt], [dbo].[FactInternetSales].[Freight], [dbo].[FactInternetSales].[CarrierTrackingNumber], [dbo].[FactInternetSales].[CustomerPONumber], [dbo].[FactInternetSales].[OrderDate], [dbo].[FactInternetSales].[DueDate], [dbo].[FactInternetSales].[ShipDate] FROM [dbo].[FactInternetSales] WHERE (([OrderDate] >= N‘2010-01-01 00:00:00‘) AND ([OrderDate] < N‘2011-01-01 00:00:00‘))
FactInternetSales2011。SQL:
WHERE (([OrderDate] >= N‘2011-01-01 00:00:00‘) AND ([OrderDate] < N‘2012-01-01 00:00:00‘))
FactInternetSales2012。SQL:
WHERE (([OrderDate] >= N‘2012-01-01 00:00:00‘) AND ([OrderDate] < N‘2013-01-01 00:00:00‘))
FactInternetSales2013。SQL:
WHERE (([OrderDate] >= N‘2013-01-01 00:00:00‘) AND ([OrderDate] < N‘2014-01-01 00:00:00‘))
FactInternetSales2014。SQL:
WHERE (([OrderDate] >= N‘2014-01-01 00:00:00‘) AND ([OrderDate] < N‘2015-01-01 00:00:00‘))
删除已经没有用的FactInternetSales分区。
模型菜单 >过程 > 处理分区。
时间: 2024-10-19 18:06:51