Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, how should the script be like if I want a column 'before 10am' to be 1 if the column 'time' is >=10:00:00, else it will be 0? Thanks.
What is the source for field Time?
Add quotes to time '10:00:00'
The field 'time' is not found.
LOAD *, Time([Date Confirmed],'hh:mm:ss') as Time
FROM
<file>
(txt, codepage is 1252, embedded labels, delimiter is '|', msq);
load *,If([Time]< Timestamp('10:00:00','hh:mm:ss'),1,0) as [Before 10am];
LOAD * INLINE [
Before 10am,
];
The time list box was created successfully with the data and all, but when the script reads it to create the 'before 10am' column, then the time field cannot be found.
I did not understand why you are giving the Inline statement below the If condition. what is the necessary of it. Inline does not work here. you should take resident of the previous table in which time field exists.
Try like this.
T1:
LOAD *, Time([Date Confirmed],'hh:mm:ss') as Time
FROM
<file>
(txt, codepage is 1252, embedded labels, delimiter is '|', msq);
T2:
LOAD *,If([Time]< Timestamp('10:00:00','hh:mm:ss'),1,0) as [Before 10am];
Resident T1;
This should work.