Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
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
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
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?
Thanks for your answer. I need to manipulate the original field so I will need the step in between.
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;