Free Newsletters:
DatabaseDaily  
Database Journal
Search Database Journal:
 
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Links Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
Database Tools
SQL Scripts & Samples
Links
» Database Forum
» DBA Jobs
» Sitemap

News Via RSS Feed


follow us on Twitter





Brocade Doubles Down on 16 Gbps Fibre Channel

Microsoft Wants iOS Apps to Run on WP7

Avaya Debuts New Virtual Services Switch
Database Journal |DBA Support |SQLCourse |SQLCourse2







Technical Specialist – Pre-sales (MA)
Next Step Systems
US-MA-Littleton

Justtechjobs.com Post A Job | Post A Resume

Featured Database Articles

MS SQL

July 11, 2005

Introduction to MSSQL Server Analysis Services: Mastering Enterprise BI: Relative Time Periods in an Analysis Services Cube, Part II - Page 4

By William Pearson

Modify the Database to Support a Relative Time Dimension in the Cube

Let's create a couple of objects within our new MS Access database to support relative time periods within the sample cube we will use later in our exercises. Again, we are doing this in MS Access to leverage existing samples and save time – the concepts are similar, although methods vary somewhat, in the more robust MSSQL Server environment.

1.  Open the RelativeTimesample.mdb in MS Access (I'm using Access 2003 in my illustrations, but Access 2000 and beyond will work, and will be very similar in operation).

2.  Get to the Database View for the database.

3.  Click the New button atop the view, as depicted in Illustration 8.

Click for larger image

Illustration 8: Adding a Table in the Database View – FoodMart 2000.mdb

4.  Select Design View from the New Table dialog that appears, as shown in Illustration 9.


Illustration 9: New Table Dialog: Select Design View

5.  Click OK.

Design View for the new table opens.

6.  Type the information presented in Table 1 into the designated places in the Design View.

Field Name

Data Type

relativetime_id

Number

relativetime_member

Text


Table 1: Creating a New Table - Design View

Design View for the new table appears as partially depicted in Illustration 10.


Illustration 10: The New Table in Design View (Partial View)

7.  Select View --> Datasheet View from the main menu, as shown in Illustration 11.


Illustration 11: Shift to Datasheet View

A dialog appears, stating that we must save the table first.

8.  Click Yes to save the table, as depicted in Illustration 12.


Illustration 12: Notice to Save the Table First ...

9.  Type the following into the Save As dialog that next appears:

relativetime

The completed Save As dialog for the new table appears, as shown in Illustration 13.


Illustration 13: Saving the New Table in the Sample Database

10.  Click OK to save the table and close the Save As dialog.

11.  Click No on the next dialog to appear, to pass on creating a Primary Key in this practice instance, as depicted in Illustration 14.


Illustration 14: Just Say "No" to Creating a Primary Key ...

The table opens in Datasheet View.

12.  Type the information assembled in Table 2 into the designated columns of the table within Table View.

relativetime_id

relativetime_member

1

Current

0

Table 2: Inserting Data into the Table - Datasheet View

NOTE: The "0" appears in the second row when we type the "1" into the first row.

Datasheet View for the table appears as shown in Illustration 15.


Illustration 15: The New Table in Datasheet View (Partial View)

13.  Select File --> Close from the main menu to close the table and return to Data View.

The new relativetime table appears among the other tables, in Data View for the database, as depicted in Illustration 16.


Illustration 16: The New Table Appears in Database View

Tools:
Add databasejournal.com to your favorites
Add databasejournal.com to your browser search box
IE 7 | Firefox 2.0 | Firefox 1.5.x
Receive news via our XML/RSS feed

MS SQL Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 



Latest Forum Threads
MS SQL Forum
Topic By Replies Updated
SQL 2005: SSIS: Script Component: Working with BLOB 0010 4 January 27th, 03:03 PM
Will an MS SQL db table trigger affect the value returned by scope_identity? wreade 2 December 19th, 04:48 PM
BULK UPDATE error benedec 1 December 14th, 08:39 AM
Toggling problem in Matrix report ssrs 2008 dev_ritesh 0 December 2nd, 02:17 PM