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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

QVD store command error

Hi all,

I am trying to store a QVD by using store command. EVen though I am giving correct path, it is throwing error.

Here initially I am read one Qvd from the same path and renaming and saving the  QVD based on some condition.

Regards,

Kumar

22 Replies
Anonymous
Not applicable
Author

use this?

Let Vqvdpath = 'D:\QlikView\SourceDocuments\QVX\Mktg_Funnel_Reports\Retention\QVD Retention\';

Inserts:

LOAD * FROM

$(Vqvdpath)fact_site_visit.QVD (qvd);

MinMaxDates:

LOAD

     Max(Floor(Timestamp#(site_visit_updated_datetime, 'MM/DD/YYYY hh:mm:ss.fff'))) as MaxDate

Resident Inserts;

LET vMinMonth = num(AddMonths(Peek('MaxDate'),-13));

DROP TABLE MinMaxDates;

noconcatenate  // as all data is going to Inserts not to Incmonths

Incmonths:

LOAD *

Resident Inserts

WHERE site_visit_updated_datetime > '$(vMinMonth)';

STORE Incmonths into $(Vqvdpath)fact_site_visit_History.QVD (qvd);

DROP TABLE Incmonths;

Anonymous
Not applicable
Author

use noconcatenate before Incmonths

Mark_Little
Luminary
Luminary

Hi,,

As other have suggested, i would take a look at the table Incmonths.

Makes sure there is data in this table, before you are storing it.

Maybe add some traces to see if your variables are being populated correctly as well?

Mark

avinashelite

I  think the variable vMinMonth is not setting properly check the variable values once , AddMonths function will work only on the values which is in the date format so before using this function please check the value once  and set the format properly

krishnacbe
Partner - Specialist III
Partner - Specialist III

Hi

Check whether the format for dates in both the source and variable are same.

Regards

Krishnapriya

sasiparupudi1
Master III
Master III

I think your table may not be getting created. I suggest you to comment the store condition and see if the table is created or not

Inserts:

LOAD * FROM

$(Vqvdpath)fact_site_visit.QVD (qvd);

MinMaxDates:

LOAD

     Max(Floor(Timestamp#(site_visit_updated_datetime, 'MM/DD/YYYY hh:mm:ss.fff'))) as MaxDate

Resident Inserts;

LET vMinMonth = num(AddMonths(Peek('MaxDate'),-13));

DROP TABLE MinMaxDates;

Incmonths:

LOAD *

Resident Inserts

WHERE site_visit_updated_datetime > '$(vMinMonth)';

//STORE Incmonths into $(Vqvdpath)fact_site_visit_History.QVD (qvd);

//DROP TABLE Incmonths;

hth

Sasi

Anonymous
Not applicable
Author

First I have to say Thanks Colin. It is creating QVD, but it is without records. It doesn't have any records in that QVD.

Colin-Albert
Partner - Champion
Partner - Champion

your where clause is trying to compare a datetime value to a month value.

both sides of the comparison must be the same format.

WHERE site_visit_updated_datetime > '$(vMinMonth)';

Add a trace command on vMinMonth so you can see the format in the logfile.

     Trace vMinMonth is $(vMinMonth) ;

Anonymous
Not applicable
Author

Can you see this screen shot. It is writing value. I have converted site_visit_updated_datetime also Num.

Not applicable
Author

Try this:

Inserts:

LOAD * FROM

$(Vqvdpath)fact_site_visit.QVD (qvd);

MinMaxDates:

LOAD

     Max(Floor(Timestamp#(site_visit_updated_datetime, 'MM/DD/YYYY hh:mm:ss.fff'))) as MaxDate

Resident Inserts;

LET vMinMonth = num(AddMonths(Peek('MaxDate'),-13));

DROP TABLE MinMaxDates;

Noconcatenate

Incmonths:

LOAD *

Resident Inserts

WHERE site_visit_updated_datetime > '$(vMinMonth)';

STORE Incmonths into $(Vqvdpath)fact_site_visit_History.QVD (qvd);

DROP TABLE Incmonths;