Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

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!

1 Solution

Accepted Solutions
montero91
Contributor

Re: Load 1 row into QVD every day

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.

1 Reply
montero91
Contributor

Re: Load 1 row into QVD every day

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.

Community Browser