don't know how to check for existing fieldnames during a load command. But try to use a mapping table to rename the fieldnames:
LOAD * Inline [
Country_Region Code, Country Code
After every LOAD from a qvd-file (or whatever):
RENAME Fields using FieldMap;
By your response to my post, I have made a mapping table with renaming fields.
The problem, however, I walk against it is that during running the script announces that the [Country_region code] not exists in the QVD.
For these reasons I can not make the translation.
I can use this method for something else.
thanks for your answer. The idea of the mapping table was: if field(s) exists, it (they) will be renamed. If not,nothing will happen, especially no error should occure. So it should be very flexible.
Jonathan and Michaels posts should bring you forward, and I learned new things about qvd meta data.
If only one field is different name, Just pass the variable for that field.
EX: QvdFieldName ('MyFile.qvd', 3)
We can use the for loop and retive all the fields from alrady stored QVD.
Hope this will help you.
Thanks & Regards,