Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
amien
Specialist
Specialist

column has value of last record

id, datetime1, datetime2, datediff(datetime2,datetime1)

datetime2 is the value of the previous value of datetime1 from the previous record.. how can i do this during loading in the edit script?

1 Solution

Accepted Solutions
Not applicable

Have tried something like :

LOAD ID,
DATETIME1,
Peek('DATETIME1') as DATETIME2,
datediff(Peek('DATETIME1'), DATATIME1) as ...

.....

It's from my memories, if it doesn't work, try to use another Inter-record function like previous.
And you may have to manage the first line case with an if statement

Good luck

Regards

View solution in original post

1 Reply
Not applicable

Have tried something like :

LOAD ID,
DATETIME1,
Peek('DATETIME1') as DATETIME2,
datediff(Peek('DATETIME1'), DATATIME1) as ...

.....

It's from my memories, if it doesn't work, try to use another Inter-record function like previous.
And you may have to manage the first line case with an if statement

Good luck

Regards