Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am using this too generated som QVD files for another APP.
load
//filebasename() as Filename,
num(subfield(filebasename(), '_', 1)) as cme_no,
num(subfield(filebasename(), '_', 2)) as meter_no,
date(floor(timestamp#(subfield(filebasename(), '_', 4), 'YYYYMMDDhhmmss')), 'YYYY-MM-DD') as import_date,
//time(frac(timestamp#(subfield(filebasename(), '_', 4), 'YYYYMMDDhhmmss')), 'hh:mm') as import_time,
//FileTime() as import_time,
today() - date(floor(timestamp#(subfield(filebasename(), '_', 4), 'YYYYMMDDhhmmss')), 'YYYY-MM-DD') as days_since_last_read,
filesize() as import_filesize
FROM [lib://Alboa_data/??????????_????????_valuereport_201809*.csv]
// (txt, codepage is 28591, embedded labels, delimiter is ';', msq)
where date(floor(timestamp#(subfield(filebasename(), '_', 4), 'YYYYMMDDhhmmss')), 'YYYY-MM-DD')>=today()-6;
Store data_qvd into [lib://qvd_filer/Alboa_data.qvd] (qvd);
Drop Table data_data_qvd;
When this is done I am using the fields
cme_no,
meter_no,
import_date
to figure out what cme_no or meter_no have an import_date.
My question:
If cme_no or meter_no does not have an import_date... How do I find them, and give them a value so I can count them in the same count? Not as another field.
Reason for this is that I count the number of import_dates to determine an action. But if there are no import_dates because the files were not there. Then I have no way of counting them. Like the table below
'Meter status' if green there is an import_date to count.
'Meter status' if there is no import_date to count, then it is just blank... (i would like to have something to count, so I can color it or at least show something)