Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load from QVD then save back to it

Is there a way to load from QVD then save back over the same QVD?  This works when running an incremental style load where I would concatenate a SQL load and QVD load and then store back to that QVD.  However it doesn't work to simply load * from QVD and the store into back to the same QVD.

Just wondering if there is something I would need to do to get around this. (Im sure I could change my approach to stop the save back to QVD if I only load from QVD also).

6 Replies
manojkvrajan
Luminary
Luminary

Yes. It is very much possible to load and save back to the same QVD. Please find attached QVW for your reference.

maxgro
MVP
MVP

why not? below a small example

try to post your script if it doesn't work

directory;

t: load rand() as r AutoGenerate 100;

STORE t into t.qvd (qvd);

DROP Table t;

// read, add some records, store in same qvd

t: load * from t.qvd (qvd);

load rand() as r AutoGenerate 200;

STORE t into t.qvd (qvd);

Brett_Bleess
Support (Former)
Support (Former)

Robby,

The only thing that comes to mind here is if you are not changing anything in the data you loaded, I am not sure the store command is going to do anything in that case as the table is unchanged.  I have not tested this myself to be honest, but about the only thing of which I can think that could be in play here the way you have described things. 

One thing you may be able to do in this case is a record count on the load and then if nothing changes, use logic in the store statement to not do the store if the record count has not increased or decreased etc.  Sorry if I am way off-base here, but thought I would toss it out in case it may be applicable.

If you can post your script, that may help as one of the folks above mentioned, as we should be able to better see exactly what you are doing and have a better idea of what could be going wrong then.

Regards,

Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Not applicable
Author

IF 1=1 THEN

UNQUALIFY *;

PERF_MGMT_MTH_SUM_QLIK:

LOAD *

  FROM E:\PERF_MGMT_MTH_SUM_QLIK.qvd(qvd)

  WHERE MONTH_KEY<='201405';

ENDIF;

TRACE('End of load statements');

Store PERF_MGMT_MTH_SUM_QLIK into E:\PERF_MGMT_MTH_SUM_QLIK.qvd (qvd);

Brett_Bleess
Support (Former)
Support (Former)

Robby,

Ok, thanks, that helps a ton, and I think if you change things just a bit, that may do the trick here:

TEMP:

LOAD *

     FROM E:\PERF_MGMT_MTH_SUM_QLIK.qvd(qvd)

(This ensures your QVD loads optimized)    


IF 1=1 THEN

UNQUALIFY *;

PERF_MGMT_MTH_SUM_QLIK:

NOCONCATENATE LOAD *

RESIDENT TEMP;

WHERE MONTH_KEY<='201405';

ENDIF;

.......

Try that and see if it results in different result or not.  This also ensures the QVD should definitely not be in use when you attempt your store statement.  Shout back when you can change things and rerun it.  If this does not do the trick, and you have a license, I would suggest opening a Support case on this issue, but be sure to send us sample QVW and QVD file, so we can run things to see exactly what is occurring here.  Hopefully the above may do the trick though.

Regards,

Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Not applicable
Author

Didn't seem to work.  Ill open up a support ticket.