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.



I have a SCD Type 2 Dimention for Location In which A Sales Office in Having two Surrogate Keys ju..

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

Post New Answer

More SAS Interview Questions

Have you been involved in editing the data or writing data queries?

1 Answers   BioServe, Oracle, Sasken,


Difference between informat and format?

1 Answers  


What are the data types that sas contain?

1 Answers  


Given an unsorted data set, how to read the last observation to a new data set?

1 Answers  


How do you write a test plan?

1 Answers   Oracle,


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

1 Answers  


Mention some common errors that are usually committed in sas programming.

1 Answers  


explain the use of % includes a statement in sas? : Sas-administrator

1 Answers  


In which case u go for libname and in which case u go for proc sql pass thru facilit diff?

1 Answers  


How might you use MOD and INT on numeric to mimic SUBSTR on character Strings?

1 Answers  


how do u test a pros sql(works or not) without executing it?

1 Answers   DELL, HSBC,


How would you code the criteria to restrict the output to be produced?

6 Answers   Accenture,


Categories