Listing Cube Elements

Use the portion of the INSERT INTO statement prior to the SELECT clause to list the elements of the cube that will be populated from the data source. For more information about INSERT INTO, see INSERT INTO.

Before using the INSERT INTO statement, the cube structure must be defined with a CREATE CUBE statement. For more information, see Creating a Local Cube.

The code in this topic includes the INSERT INTO statement without the SELECT clause, which is included in the following topic.

'*-----------------------------------------------------

'* Note: The SELECT clause might just be passed through

'* to the relational database.

'* So a stored procedure could be passed in, for example.

'* Note: Columns in the SELECT can be in any order.  One merely has to

'* adjust the order of the list of level/measure names to

'* match the order of columns in the SELECT clause.

'*-----------------------------------------------------

strInsertInto = strInsertInto & "INSERTINTO=INSERT INTO Mycube ( Product.[Product Family], Product.[Product Department],"

strInsertInto = strInsertInto & "Product.[Product Category], Product.[Product Subcategory],"

strInsertInto = strInsertInto & "Product.[Brand Name], Product.[Product Name],"

strInsertInto = strInsertInto & "Store.[Store Country], Store.[Store State], Store.[Store City],"

strInsertInto = strInsertInto & "Store.[Store Name], [Store Type].[Store Type], [Time].[Column],"

strInsertInto = strInsertInto & "[Time].Formula.Year, [Time].Formula.Quarter, [Time].Formula.Month.[Key],"

strInsertInto = strInsertInto & "[Time].Formula.Month.Name, Warehouse.Country, Warehouse.[State Province],"

strInsertInto = strInsertInto & "Warehouse.City, Warehouse.[Warehouse Name], Measures.[Store Invoice],"

strInsertInto = strInsertInto & "Measures.[Supply Time], Measures.[Warehouse Cost], Measures.[Warehouse Sales],"

strInsertInto = strInsertInto & "Measures.[Units Shipped], Measures.[Units Ordered] )"

(c) 1988-1998 Microsoft Corporation. All Rights Reserved.