Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a batch of files in CSV format loaded in local directory with different file name(eg. Salesdaily02062017.CSV and Salesmonthly052017.CSV). Data in all the file is same only the changes in the naming convention(daily & monthly with different timestamp).
On regular basis i receive one daily file, during monthend i receive two files i.e. one daily and one monthly. I am looking for merge daily and monthly files together into QVD and set a variable when the monthly data processed into QVD.
Could you please help me in this case.
Regards,
Rohit
Maybe something like this:
Sales:
load
*,
if(index(filebasename(), 'monthly'), 'monthly', 'daily') as Type,
date(alt(date#(keepchar(filebasename(), '0123456789'), 'MMYYYY'),
date#(keepchar(filebasename(), '0123456789'), 'DDMMYYYY'))) as Date
from Sales*.csv (txt);
store Sales into Sales.qvd (qvd);
- Marcus