2 Replies Latest reply: Jul 18, 2012 2:37 AM by giovanni duca RSS

    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

       

       

        • 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)';