Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Add a column to existing QVD





Below is my script to load data from a QVD i created before hand. However i would like to add another column in this script and all the values in this new column will be the same.

So i need to add another column called FUND and it should be populated with SPRS for all the values.

Directory;

PCPCapTable:

LOAD

AffPdExt as DateofService

FROM

qvd\PCPCapTableMCRProject.qvd

(qvd);

Thanks

Krishan







1 Solution

Accepted Solutions
johnw
Champion III
Champion III

Like this? Or did you want to put the column IN the QVD itself, not just in your application?

Directory;
PCPCapTable:
LOAD
AffPdExt as DateofService
,'SPRS' as FUND
FROM qvd\PCPCapTableMCRProject.qvd (qvd);

View solution in original post

11 Replies
Not applicable
Author

Try with this:

LOAD

AffPdExt as DateofService,

FUND AS SPRS

FROM

qvd\PCPCapTableMCRProject.qvd

(qvd);

Regards,







Not applicable
Author

Unfortunetly that did not work. It errors out.

Not applicable
Author

Share you application. I can help you.

Regards,

Not applicable
Author

For security reasons i cannot but the script is pretty simple. I just need to add the extra column.

Thanks.

johnw
Champion III
Champion III

Like this? Or did you want to put the column IN the QVD itself, not just in your application?

Directory;
PCPCapTable:
LOAD
AffPdExt as DateofService
,'SPRS' as FUND
FROM qvd\PCPCapTableMCRProject.qvd (qvd);

Not applicable
Author

Thank you this worked.

Initially i tried this but i had the "comma" after the word date of service instead of at the beginning of the next line. Weird how that works.

Thanks again.

johnw
Champion III
Champion III

The position of the comma actually shouldn't make any difference, so maybe it was just a typo or something. Anyway, glad you got it working now.

Not applicable
Author

I have daily QVD files for 3 years. I need to add a couple of columns to each of them with default value (NULL actually). Can I do this without reloading the data? Otherwise it will be huge amount of data and time to do this

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I don't think you can do this reliably without reading and writing each QVD. You can do that in a filelist loop pretty easily.

Depending on how you are reading these old files, you may consider just introducing the new field as it's needed by someone consuming the old qvd. you can proably detect that the field is missing by checking something like QvdNoOfFields().

-Rob