1 Reply Latest reply: Dec 28, 2012 12:42 PM by victor montero RSS

    Load 1 row into QVD every day

      Here's what I have to do. I made a QVW that has some data about the number of reports we have. I have managed to send todays date and that report count to a QVD but how do I go about inserting a new row into the QVD every time it is reloaded as long as the date doesn't already exist in the qvd?

       

      My current code for the QVD is this..

       

      ReportCount:

       

      LOAD

      date(today()) as TotalCount_Date,

      count(distinct((Report.Name))) as Report.Total.Count

      Resident Reports;

       

      store ReportCount into ...

       

      Thanks!

        • Re: Load 1 row into QVD every day
          victor montero

          hi ethan

           

          try it with variables:

           

          Let Var_today= Today();

           

          Let Nametable= ‘LOAD’ & $( Var_today);

              

          $( Nametable):

            LOAD

            *,

            $( Var_today) as Date_Today

            Resident Reports;

           

          Let Var_Store = $( Nametable)  & ‘.qvd’ ;

           

          store $( Nametable) into $(Var_Store); 

           

          With this you must generate a qvd per day with a date field.

          Then you make a query to load with 'LOAD *' to read all

           

          I hope you find it useful.