Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
dseelam
Creator II
Creator 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
vishsaggi
Champion III
Champion III

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
vishsaggi
Champion III
Champion III

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;

dseelam
Creator II
Creator II
Author

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

vishsaggi
Champion III
Champion III

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;

vishsaggi
Champion III
Champion III

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