Databases Reference
In-Depth Information
the DDL, but by default Analysis Services creates the table only
if it does not exist in the database.
CREATE TABLE [dbo].[WriteTable_WB Fact](
[BudgetExpenseAmount_0] [float] NULL,
EmployeeKey_1] [int] NULL,
[QuarterKey_2] [int] NULL,
[MS_AUDIT_TIME_3] [datetime] NULL,
[MS_AUDIT_USER_4] [nvarchar](255) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL
) ON [PRIMARY]
10. Once the writeback table has been created, the cube has been enabled for
writeback. You can now update the budget values for 2004 Q3. You have
the option to writeback to a single cell or multiple cells depending on where
you write the data. You will learn the various options in the next few sec-
tions.
Update a Single Cell Value
One of the scenarios is to update a single cell value in the cube. For example, you
need to allocate a budget of $1000 for Jae Pak. Follow these instructions to update
the cell value corresponding to Jae Pak:
1. Open SSMS and create two new MDX query windows.
2. Select the database WriteBackExample and the Adventure
Works DW cube.
3. In step 5 of the previous section you saw the budget value for
2004 Q3 for employee Jae Pak was null. Send the following up-
date statement to update the budget value for employee Jae
Pak:
UPDATE CUBE [Adventure Works DW]
SET ( [WB Employee].[Manager].&[291]
, [WB Period].[Period].&[20043]) = 1000
//Updating the budget for employee Jae Pak for
Quarter 3 of year 2004
Search WWH ::




Custom Search