Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Xabinav
Creator
Creator

Help with creating SCD table

Hello
I need your help to create the second table from the first table.
I try to duplicate the dates on all subsequent records, until the next date appears and so on ...

Thanks, Adiel

 

Capture 1.PNG

Labels (2)
1 Solution

Accepted Solutions
Gysbert_Wassenaar

Like this for example:

LOAD
    Line,
    CustomerID,
    Alt(IsEnter,0) as IsEnter,
    If(Len(Trim(EnterDate))>0, EnterDate, Peek(EnterDate)) as EnterDate
FROM
     ...source table...
    ;

talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Like this for example:

LOAD
    Line,
    CustomerID,
    Alt(IsEnter,0) as IsEnter,
    If(Len(Trim(EnterDate))>0, EnterDate, Peek(EnterDate)) as EnterDate
FROM
     ...source table...
    ;

talk is cheap, supply exceeds demand
Xabinav
Creator
Creator
Author

Thanks !!!