2 Replies Latest reply: Feb 4, 2014 3:44 PM by Carlos Reyes RSS

    Qvd manipulation

      Hi everyone,


      I have two questions.


      1) Is it possible to prefix a qvd file when you store it??

         For example I have an Events table and i want to store it a qvd as (current_week)_Events.qvd

         Is that possible in any way??


      2) After I do that I want to read from all the prefixed qvds and store the data in another separate table.

         Something like


         Load *,

                  (current_week) as week <---- this week should be unique for every qvd

         from *_Events.qvd


         did not work for me


      Any help??



        • Re: Qvd manipulation
          Stefan Wühl

          Maybe something like this:


          Let vWeek = Week(today());


          store TABLE into $(vWeek)_Events.qvd (qvd);



          LOAD *,

            subfield(FileName(),'_',1) as Week

          from *_Events.qvd (qvd);

          • Re: Qvd manipulation
            Carlos Reyes

            1) You can, what I usually do is that I create a variable that changes its value in each one of the cycles that are executed by a FOR. Something like this:


            FOR EACH Date IN $(ListaFechas)

            LET QVD_SALES_HDR = 'SALES_HDR_' & Date( Date, 'YYYYMM');




            2) You can do that too. I think your sintaxis should work, although I never create prefixed qvds, I always use postfix.