Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have an application that runs weekly and I am trying to automate qvd creations and reloads.
My scenario:
I have weekly text file that are run over the weekend and are stored as text files. My file names will always be of the form FileName_DDMMMYYYY for every week. For example week 1 will be 03Jun2011, week 2 will be 10Jun2011, week 3 will be 17Jun2011.
Is there a way to create some kind of dynamic variable in my load script to cater for this changing weekly date value, so that I do not have to hardcode my script always.
At the moment I have come up with
let weekdate = date(today() -2, 'DDMMMYYYY');
let week1 = 'FileName_$(weekdate)';
let j=1;
TableName:
Load ........
From
(txt, codepage is 1252, embedded labels, delimiter is ',', msq);
The solution I have is not flexible enough and will only work if I run my automation piece on a monday but not on any other day as the dates change making the file name wrong.
Can someone please help me out to get this working? Thanks
Thanks a lot for everything
Great! You're welcome.
But do not dismiss Kaushik Solanki's suggestion. Specially if you have a lot of files to read. If you test both, please let us know how did they performed.
Regards.
BI Consultant