Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a simple script that stores my info into another table.
My question is, is there anyway of adding the current date to that file name? For example, and I don't know if this is the right way of doing it, but I'm hoping my example will give you the idea of what I'm trying to do!:
store Daybooks into Daybooks_+Today().qvd (QVD);
Does that make sense?!
So, if I run the app today, my QVD file would be called:
Daybooks_18-12-2014.qvd
Is there a way of doing it?
Thank you!
Di
so something like this (not tested)
set vFileName = 'File_Name'&'_'& date(today(),'DD-MM-YYYY');
store table into $(vFileName)(qvd);
set a parameter with the desired filename and include the date in it in the desired output format
then write the file with name as the parameter
Diane,
you can do something like below:
Test:
LOAD
'$(vPlant)' as Plant,
*;
SQL SELECT
NSPCIDNR,
NTOOLNR,
NSTPNR,
NPERS_IDNR,
NLFDSTATIONNR,
NLFDMASCHNR,
NLFDLINIENR,
DTTSPROBE,
DTTSERF,
NSTPFEHLERFLAG,
DTO,
DTU,
DXQ,
//NKORRNR,
SZUSINFO1,
SZUSINFO2,
SZUSINFO3,
SZUSINFO4,
SZUSINFO5,
SZUSINFO6,
SZUSINFO7,
SZUSINFO8,
SZUSINFO9
FROM $(vPlantAutor).STICHPROBE
WHERE DTTSERF > to_timestamp('$(vLAST_LOAD_TIME)', 'DD.MM.YYYY HH24:MI:SS');
Thanks,.
AS
Here vLAST_LOAD_TIME= today()
Thanks,
AS
so something like this (not tested)
set vFileName = 'File_Name'&'_'& date(today(),'DD-MM-YYYY');
store table into $(vFileName)(qvd);
A 2 step approach
1st: let vFiledate = date(today(), 'YYYY_MM_DD');
2nd
Tablename:
Load *
from .... ;
store Tablename into Tablename_to_qvd_$(vFiledate ).qvd (qvd);
Hi,
PFA.
We would need the replace since we cannot use / in QVD name.
let variable=replace(today(),'/','-');
one:
load * inline
[a
1
2];
store one into one_$(variable).qvd(qvd);
Thans,
Sundar
or vFolder= 'MyFolder'& today()
then use it when storing your table, for example
store table vFolder into MyFolder.qvd(qvd)
Hi Felix,
Worked wonderfully!
Thank you!!!
Another snippit of code I shall be nothing down!!
Happy Christmas / Holidays / Time Off / Doing Nothing Days, (delete as appropriate!)
Di