Dear Friends,
I have a dayly file like this:
Field_1
0
3
6
10
12
20
0
5
15
And I would like to get:
Field_1 Field_2 Last_1
0 3 3
3 6 3
6 10 4
10 12 2
12 20 8
20 0 4
0 5 5
5 15 10
15 9
Is there any way to do this, I was thinking that maybe there is some function to get the value form next field, like GetNext()
Select
Filed_1,
GetNext(Field_1) as Field_2,
if(GetNext(Filed_1) > Field_1, GetNext(Filed_1) - Field_1, 24 - Field_1) as Last_1
From
Dayly_File
Best Regards,
Javier Pozo
I have a dayly file like this:
Field_1
0
3
6
10
12
20
0
5
15
And I would like to get:
Field_1 Field_2 Last_1
0 3 3
3 6 3
6 10 4
10 12 2
12 20 8
20 0 4
0 5 5
5 15 10
15 9
Is there any way to do this, I was thinking that maybe there is some function to get the value form next field, like GetNext()
Select
Filed_1,
GetNext(Field_1) as Field_2,
if(GetNext(Filed_1) > Field_1, GetNext(Filed_1) - Field_1, 24 - Field_1) as Last_1
From
Dayly_File
Best Regards,
Javier Pozo