Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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)';

View solution in original post

2 Replies
Highlighted
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)';

View solution in original post

Highlighted
Not applicable

Re: saving a qvd with reload date into title

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