Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
please assist with the below script :
The variable flag is not calculation. Its always going to 0 that is else part.
Table:
LOAD
Interval([Departure DateTime] - [Arrival DateTime], 'hh')as [ED_LOS_HOURS],
if(Interval([Departure DateTime] - [Arrival DateTime], 'hh')>='06',1,0)as [ED LOS > 6 (Hours) Flag]
FROM
[$(vL.QVDPath)\QVD \Table.qvd]
(qvd)
The interval() stuff isn't really necessary because you could query the result directly, like:
if([Departure DateTime] - [Arrival DateTime] >= 0.25, 1, 0) as [ED LOS > 6 (Hours) Flag]
- Marcus
try below
if(Interval([Departure DateTime] - [Arrival DateTime], 'hh')>= INTERVAL(6,'hh'),1,0)as [ED LOS > 6 (Hours) Flag]
The interval() stuff isn't really necessary because you could query the result directly, like:
if([Departure DateTime] - [Arrival DateTime] >= 0.25, 1, 0) as [ED LOS > 6 (Hours) Flag]
- Marcus