Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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
TABLENAME:
Load * from TABLENAMEQVD where Month = YourWrongMonth;
Restore TABLENAME into TABLENAME.qvd (QVD);
Hahaha I don't know why I didn't even think of that.. Silly me! Thanks for the assistance guys
tag the answer as correct and close the discussion then
Fabrice
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
That looks like it should work.
What does DT and month(DT) look like?
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?
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
... where year(DT) <> 2013 or month(DT) <> 'Oct'
Fabrice