Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i should get the value 1 in seperate column if the time is 1 hour difference between same or different vehicles and empty if diff is less than 1 hour. There more than 1 lakh data in the table.
Hi,
Do something like this:
data:
Load
[Vehicle No],
[Date & Time]
//OTher fields here too
From [Whatever];
_tmpField:
load
[Vehicle No],
[Date & Time],
if
(
peek([Vehicle No]=[Vehicle No],
if
(
[Date & Time]-peek([Date & Time])>1,
1,
0
)
) as [Flag Difference bigger then 1]
Resident data
order by
[Vehicle No],
[Date & Time]
;
left join (data)
Load *
Resident _tmpField;
drop table _tmpField;
Thank you Felip.
It works.
Can't you mark my answer as correct since it helped you?
we should do it in front end reporting in straight table by loading the excel file