Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Contributor II

create QVD every monday

Hello All,


Is in possible to create a new QVD every Monday?

(There is a column in data source with only Monday's date for whole week)

1 Solution

Accepted Solutions
Highlighted
Esteemed Contributor III

Re: create QVD every monday

May be try this?

ODBC CONNECT32 YourSourceDBName;

Table1:

SQL SELECT ModifiedDate

FROM SourceTableName;

LET vMondayDate = Peek('ModifiedDate',0,'MondayDate');

DROP TABLE Table1;

IF(ModifiedDate = Today() ) Then

Test:

SQL SELECT *

FROM SourceTableName;

STORE Test INTO $(vQVDPath)Test.qvd (qvd);

DROP TABLE Test;

ELSE

FirstTable:

SQL SELECT *

FROM SourceTableName;

Store FirstTable INTO $(vQVDPath)DailyQvd.qvd(qvd);

Drop Table FirstTable;

ENDIF;

View solution in original post

4 Replies
Highlighted
Esteemed Contributor III

Re: create QVD every monday

What is the date format of that DateField coming from Source?

Have not tested but

May be you can try like:

ODBC CONNECT32 YourSourceDBName;

MondayDate:

SQL SELECT ModifiedDate

FROM SourceTableName;

LET vMondayDate = Peek('ModifiedDate',0,'MondayDate');

DROP TABLE MondayDate;

IF(ModifiedDate = Today()) Then

Test:

SQL SELECT *

FROM SourceTableName;

STORE Test INTO $(vQVDPath)Test.qvd (qvd);

DROP TABLE Test;

ELSE

Exit Script

ENDIF;

Highlighted
Contributor II

Re: create QVD every monday

Parallel I would like to refresh data every day ? but would like to create a new qvd on Monday because my source will be wiped out previous week data on Sunday night

Simple words I need history on Monday for previous week and create and refresh new qvd for rest of present week

date in the format m/d/yyyy

Highlighted
Esteemed Contributor III

Re: create QVD every monday

May be try this?

ODBC CONNECT32 YourSourceDBName;

Table1:

SQL SELECT ModifiedDate

FROM SourceTableName;

LET vMondayDate = Peek('ModifiedDate',0,'MondayDate');

DROP TABLE Table1;

IF(ModifiedDate = Today() ) Then

Test:

SQL SELECT *

FROM SourceTableName;

STORE Test INTO $(vQVDPath)Test.qvd (qvd);

DROP TABLE Test;

ELSE

FirstTable:

SQL SELECT *

FROM SourceTableName;

Store FirstTable INTO $(vQVDPath)DailyQvd.qvd(qvd);

Drop Table FirstTable;

ENDIF;

View solution in original post

Highlighted
Esteemed Contributor III

Re: create QVD every monday

When your source wipes out sunday night how can you get the Monday dates from your source for previous week?