Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Loading all fields and changing one

Hi!

I have the following issue. I need to load all fields from a QVD file where I need to change one of them. To keep the script adaptive to the adding and removing of fields I would like to use the * instead of the field names. After I have changed one of the fields the table needs to be concatenated to another table. Any ideas of doing this without to many temporary tables? Ideally the script would look something like this:

Concatenate Load

     * (without field x),

     field x

From

     temp.QVD;

Thanks for any help!

5 Replies
vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi,

You can write

Load

*,

Field x as Field y

from temp.qvd;

Drop Field x

rename field Field y to Field x;

Hope this will help

Miguel_Angel_Baeyens

Good one Vijay,

Even faster if you do the RENAME only one:

Data:

LOAD * // x field is here as "original"

FROM File.qvd (qvd);

RENAME FIELD original TO x;

Hope that helps.

Miguel

Not applicable
Author

Thanks for your answer. This still requires me to do a concatenate and drop table statement. Is there an easier way to concatenate the table after I have renamed the field?

Not applicable
Author

Thanks for your answer. I need to manipulate the original field so I will need the step in between.

vijay_iitkgp
Partner - Specialist
Partner - Specialist

I dont know if I understand correctly

but U can do:

Load

*,

Field x as Field y

from temp.qvd;

Drop Field x;

rename field Field y to Field x;

Concatenate

Load

*

from temp2.qvd;