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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Delete data from a QVD

Hi all,

I load data monthly in a single QVD file and one of the months is incorrect.

Is there a way to delete information from a QVD in order to reload the correct data?

Or will I have to create a new QVD file?

12 Replies
Not applicable
Author

Sean,

You can add a WHERE statement to not load this particular month.

Reload this month from your source

Recreate the QVD file for next time

Fabrice

MK_QSL
MVP
MVP

TABLENAME:

Load * from TABLENAMEQVD where Month = YourWrongMonth;

Restore TABLENAME into TABLENAME.qvd (QVD);

Not applicable
Author

Hahaha I don't know why I didn't even think of that.. Silly me! Thanks for the assistance guys

Not applicable
Author

tag the answer as correct and close the discussion then

Fabrice

Not applicable
Author

LOAD sbsFileName,

     FileTime,

     [TERM-ID],

     [BATCH-SEQ],

     DT,

     month(DT) as Month,

     year(DT) as Year,

     SbsRunDT,

     TIME,

     TRAN,

     CARDHOLDER,

     REFERENCE,

     AUTH,

     Amount_SBSA,

     [TRACE NO],

     PK

FROM

(qvd)

Where year(DT) = 2013 and month(DT) <> 'Oct'

It isn't reading the '<>' function and its still loading Oct Results? Help

johnca
Specialist
Specialist

That looks like it should work.

What does DT and month(DT) look like?

Not applicable
Author

Hi John,

I got that to work but now I'm stuck with another issue.

Because I  need October and Novemembers data for 2010, 2011, 2012  but not 2013 I've decided to first load all data from year=2013 and month <> Oct and Nov

It created a new file for me called sbsloadfix.qvd

Now I'd like to load all of 2010,2011,2012 into that same QVD file however if I rerun the script using the where year = 2012 it'll then overwrite the 2013 data..

Any idea how to do a Concatenate store?

johnca
Specialist
Specialist

Hi Sean,

After you load the good data from Oct & Nov 2013 do a load on all the data where not exists (DT).

Sometimes it's easiest to save the good data into QVD then drop that table and reload it, then do the where not exists.

--John

Not applicable
Author

... where year(DT) <> 2013 or month(DT) <> 'Oct'

Fabrice