Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

saving a qvd with reload date into title

Hello,

I want to load and save weekly a qvd file. I put on the beginning of script a variable vReloadStart=now() which I want to use into saved file name.

But till now I didn't succeded saving qvd with reload date into filename. Haw can I do this?

let

vReloadStart=now();


Framework_temp:

SELECT     *,

'$(vReloadStart)' as DataReload,

FROM         FRAMEWORK.dbo.NETWORK_PRINTER

LEFT OUTER JOIN

             FRAMEWORK.dbo.PRINTER_STATISTICS ON NETWORK_PRINTER.PRINTER_ID = PRINTER_STATISTICS.PRINTER_ID

       LEFT OUTER JOIN

                      FRAMEWORK.dbo.NETWORK_ADAPTER ON NETWORK_PRINTER.ADAPTER_ID = NETWORK_ADAPTER.ADAPTER_ID

             LEFT OUTER JOIN

                      FRAMEWORK.dbo.PRINTER_STATISTICS_HISTORY ON PRINTER_STATISTICS.STATISTICS_ID = PRINTER_STATISTICS_HISTORY.STATISTICS_ID
;
store Framework_temp into 'C:\QW_Reports\Diverse\Lexmark\QVD\Framework_$(vReloadStart).qvd (qvd)';

Thank you!

Olivia

1 Solution

Accepted Solutions
Not applicable

Re: saving a qvd with reload date into title

file names can not contain /  and :

let

vReloadStart=now();

let

vReloadStartText=Replace(Replace(vReloadStart,'/','-'),':','_');



Framework_temp:

SELECT     *,

'$(vReloadStart)' as DataReload,

FROM         FRAMEWORK.dbo.NETWORK_PRINTER

LEFT OUTER JOIN

             FRAMEWORK.dbo.PRINTER_STATISTICS ON NETWORK_PRINTER.PRINTER_ID = PRINTER_STATISTICS.PRINTER_ID

       LEFT OUTER JOIN

                      FRAMEWORK.dbo.NETWORK_ADAPTER ON NETWORK_PRINTER.ADAPTER_ID = NETWORK_ADAPTER.ADAPTER_ID

             LEFT OUTER JOIN

                      FRAMEWORK.dbo.PRINTER_STATISTICS_HISTORY ON PRINTER_STATISTICS.STATISTICS_ID = PRINTER_STATISTICS_HISTORY.STATISTICS_ID
;
store Framework_temp into 'C:\QW_Reports\Diverse\Lexmark\QVD\Framework_$(vReloadStartText).qvd (qvd)';

2 Replies
Not applicable

Re: saving a qvd with reload date into title

file names can not contain /  and :

let

vReloadStart=now();

let

vReloadStartText=Replace(Replace(vReloadStart,'/','-'),':','_');



Framework_temp:

SELECT     *,

'$(vReloadStart)' as DataReload,

FROM         FRAMEWORK.dbo.NETWORK_PRINTER

LEFT OUTER JOIN

             FRAMEWORK.dbo.PRINTER_STATISTICS ON NETWORK_PRINTER.PRINTER_ID = PRINTER_STATISTICS.PRINTER_ID

       LEFT OUTER JOIN

                      FRAMEWORK.dbo.NETWORK_ADAPTER ON NETWORK_PRINTER.ADAPTER_ID = NETWORK_ADAPTER.ADAPTER_ID

             LEFT OUTER JOIN

                      FRAMEWORK.dbo.PRINTER_STATISTICS_HISTORY ON PRINTER_STATISTICS.STATISTICS_ID = PRINTER_STATISTICS_HISTORY.STATISTICS_ID
;
store Framework_temp into 'C:\QW_Reports\Diverse\Lexmark\QVD\Framework_$(vReloadStartText).qvd (qvd)';

Not applicable

Re: saving a qvd with reload date into title

Thank you. This solved my problem. Have a nice day!

Community Browser