I have a much large QVW with multiple QVD references and I recently noticed that all the fact tables have duplicate rows when I load data from the QVD.
I created this quick script to simulate a typical QVD Store and load process. The SQL statement fetches one record from a SQL server table but as soon as I use the LOAD * statement, QV says there are two rows in the table.
If I add the DISTINCT clause to make it LOAD DISTINCT * there is only one row BUT why is this necessary. Do you always need to put DISTINCT in the LOAD statement from a QVD?
Thanks Rob. I guess I misunderstood the proper usage of LOAD and thought it was just to fetch records from the QVD into memory for use within the current QVW session.
I am working towards staging records in a separate loading QVW from SQL into the QVD files and then having a more heavily utilized QVW that doesn't fetch from SQL but only from those staged QVD files. I guess by having both the SQL with STORE and the LOAD I was doubling up records
then I add historical data which had stored before
LOAD Distinct * FROM $(vQVD)\NEWFILE.qvd (QVD)
Sometimes my historical data has the same month. For example I load February data, then concatenate historical data with February. I get double count for February.( instead of 10 , I get 20). Do you know how to avoid duplicate records?