BookmarkSubscribeRSS Feed
dennis_oz
Quartz | Level 8

Hi ,

I have added a SCD  type 2 transormation in my job.

My current output is

Buisiness key    start_date             end_date            Current_row

AAA                   12MAY2014         12DEC2999          0

AAA                    13MAY2014          12DEC2999         1

How do I set the end_date for the 1 record  as 13MAY2014 ? Please find what I mean below

Buisiness key    start_date             end_date            Current_row

AAA                   12MAY2014         13MAY2014          0

AAA                    13MAY2014          12DEC2999         1

2) Also when I use this Target table in another job , what condition should i give, so that I get only the latest record ?

    I mean will SAS DI take the latest record without mentioning any condition iin Extract Transformation ?

1 REPLY 1
LinusH
Tourmaline | Level 20

It's not clear how your logic works. How are you defining end_date in the flow/SCD Type 2 transform? What does your transaction/input data look like?

If you wish to change an end date if it's not current row, should either be done only if it's not part of change tracking (set it as Type 1 columns), or has to be done as an ad-hoc administrative activity.

Data never sleeps

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 358 views
  • 0 likes
  • 2 in conversation