Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Please kindly assist me in the scripting -
I have file with date field which I have to load in qvd -
I am tryin to write incremental load script like below , but its not solving my purpose -
HCW:
LOAD
Date(Date#(left(FileName(),6),'DDMMYY'),'D/M/YYYY') as _Date,
if(rowno()=1, 1,0) as count_active,
if(rowno()=2, 1,0) as count_total_isolation,
if(rowno()=3, 1,0) as count_total_community,
Nursing,
Medical,
"Allied Health" as AH,
"Scientific/Technical" as scientific,
"Admin/ Corporate" as admin_corporate,
"Other",
"Total",
FileName() as HCW.FileName
FROM [lib://280322.xlsx]
(ooxml, embedded labels, table is [LHD Summary]);
STORE HCW INTO [lib://HCWFulldata.qvd] (qvd);
Last_Updated_date:
load max(date(_Date),'D/M/YYYY') as MaxDate
FROM [lib://HCWFulldata.qvd] (qvd);
Let vLast_Updated_date=Peek('MaxDate',0,'Last_Updated_date');
NoConcatenate
HCW:
LOAD
Date(Date#(left(FileName(),6),'DDMMYY'),'D/M/YYYY') as _Date,
if(rowno()=1, 1,0) as count_active,
if(rowno()=2, 1,0) as count_total_isolation,
if(rowno()=3, 1,0) as count_total_community,
Nursing,
Medical,
"Allied Health" as AH,
"Scientific/Technical" as scientific,
"Admin/ Corporate" as admin_corporate,
"Other",
"Total",
FileName() as HCW.FileName
FROM [lib://290322.xlsx]
(ooxml, embedded labels, table is [LHD Summary]) where Date(Date#(left(FileName(),6),'DDMMYY'),'D/M/YYYY') > $(vLast_Updated_date);
Concatenate
Load
* from [lib://HCWFulldata.qvd] (qvd);
STORE HCW INTO [lib://HCWFulldata.qvd] (qvd);
drop table HCW;
HI,
Do all the files have the same-named fields? If so, you can try to do
Load * from *.xlsx
Bill