I have a SCD Type 2 Dimention for Location In which A Sales
Office in Having two Surrogate Keys just because of the
change in it's Sales Group.
SKey SalesGroup Sales Office BeginDate EndDate
280 SG1 SO1 01APR2000 01APR2010
281 SG2 SO1 02APR2010 31MAR2999
Now while loading the Fact, the Lookup ir returning SKey
280 for records before and after 01APR2010.
I am not able to give WHERE condition in the Lookup
Properties (TranDate between BeginDate and EndDate).
Please help.
Answer / Vinod Kumar Bohra
In your case, it seems like the lookup table is returning the wrong SKey because it's not correctly interpreting the end date of Sales Group 281. One possible solution could be to update the end date for Sales Group 281 to an appropriate future date, such as 31DEC9999, so that it doesn't interfere with the records after 01APR2010. Another option would be to create a separate lookup table for each Sales Group and use that in your fact table.
| Is This Answer Correct ? | 0 Yes | 0 No |
Have you been involved in editing the data or writing data queries?
1 Answers BioServe, Oracle, Sasken,
Difference between informat and format?
What are the data types that sas contain?
Given an unsorted data set, how to read the last observation to a new data set?
How do you write a test plan?
Can you execute macro within another macro? If so, how would sas know where the current macro ended and the new one began? : sas-macro
Mention some common errors that are usually committed in sas programming.
explain the use of % includes a statement in sas? : Sas-administrator
In which case u go for libname and in which case u go for proc sql pass thru facilit diff?
How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?
how do u test a pros sql(works or not) without executing it?
How would you code the criteria to restrict the output to be produced?