![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi All, I have a dimension table, below : CREATE TABLE dbo."Product"( "ProductID" INT NOT NULL IDENTITY(1,1) PRIMARY Key, "ProdCode" CHAR(16) NOT NULL, -- product code "DeptCode" CHAR(2) NOT NULL, -- department code "Period" INT Not Null, "ProdName" VARCHAR(40) NOT NULL ) CREATE INDEX "MyIdx" ON dbo."Product_Dim"("ProductCode, "DeptCode", "Period") I create a VIEW on this table to combine "ProdCode"+"DeptCode" into a single 'column' and use it as relation/Join to Fact Table. (this single column is a MUST for use as member key column) : Create VIEW Product_Dim AS SELECT ProdCode+DeptCode AS ProductCode, Period, ProdName FROM Product The question is : To use "ProdCode+DeptCode" as Member Key Column, is it better to use VIEW as above ?? or to create a New Column (ProdCode+DeptCode) in the above table ?? Thank you for any help, Trist |
![]() |
| Thread Tools | |
| Display Modes | |
| |