Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Make Year, Period in Fact table as a dimension key attribute

Posted on 2011-10-18
2
Medium Priority
?
257 Views
Last Modified: 2013-11-10
Is it possible to make the year and Period in my Fact table as a dimension key attribute ? My current Fact table scheme is :



REATE TABLE [dbo].[FactPERBAL](
        [TRXNO] [int] IDENTITY(1,1) NOT NULL,
       [ACTKEY] [int],
      [ACTINDX] [int] NOT NULL,
      [ACTNUMBR_1] [char](11) NOT NULL,
      [YEAR1] [smallint] NOT NULL,
      [PERIODID] [smallint] NOT NULL,
      [PERDBLNC] [numeric](19, 5) NOT NULL,
      [CRDTAMNT] [numeric](19, 5) NOT NULL,
      [DEBITAMT] [numeric](19, 5) NOT NULL,
 CONSTRAINT [PK_FactPERBAL] PRIMARY KEY NONCLUSTERED
(
      [TRXNO] ASC
))
0
Comment
Question by:AXISHK
2 Comments
 
LVL 21

Accepted Solution

by:
Jason Yousef, MS earned 2000 total points
ID: 37012717
I never done that and I don't think it's the best way, but since you don't have a date column, you can create another calculated column using the 2 values of the year and period, and do the same in your time table, set the right relationship and I think that would do.
0
 

Author Closing Comment

by:AXISHK
ID: 37015422
tks
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question