Database Reference
In-Depth Information
13.
Right-click the Fill dimdates Execute sQl Task and choose Execute Task from the
context menu (Figure 8-20 ).
Figure 8-20. Executing the Fill DimDate Execute SQL Task
14.
when the task is complete, stop Visual studio's debugger and verify that the task ran
successfully; if there are errors, troubleshoot and try again.
15.
open sQl server Management studio and verify that dimdates has data in it.
Configure the Add Null Date Lookup Values Execute SQL Task
now we need to add a couple of dates used to for null value lookups to the dimdates table. This was an
option we discussed in Chapter 6 but have waited until now to implement it.
locate the comment -- 2e) Add additional lookup values to DimDates in
the sQl code file and review the code beneath it. The code should look like listing 8-5.
Listing 8-5. Code That Adds New Dates to the DimDates Table
Set Identity_Insert [DWPubsSales].[dbo].[DimDates] On
Insert Into [DWPubsSales].[dbo].[DimDates]
( [DateKey]
, [Date]
, [DateName]
, [Month]
, [MonthName]
, [Quarter]
, [QuarterName]
, [Year], [YearName] )
Select
[DateKey]=-1
, [Date]=Cast('01/01/1900' as nVarchar(50) )
, [DateName]=Cast('Unknown Day' as nVarchar(50) )
, [Month]=-1
, [MonthName]=Cast('Unknown Month' as nVarchar(50) )
, [Quarter]=-1
, [QuarterName]=Cast('Unknown Quarter' as nVarchar(50) )
, [Year]=-1
1.
 
Search WWH ::




Custom Search