I know I can easily rename fields with a MAPPING table using the statement > RENAME USING ..<
However, I have to use QUALIFY with all the fields to be able to compare it to another in QlikView. So I could just as easily construct individual Applymap() commands using the SUBFIELD() function, to just cut off that qualification - and concatenate it to the result_name. But is there a way to build this into the > RENAME USING < statement?
I think there are no possibilities with the rename-statement itself. You will always need to adjust the mapping table - here an example how you could get a mapping-table to remove the table-qualifier (which could be of course outsourced as sub-routine to keep the script clean).
for i = 1 to nooffields('YourTable')
temp:
Load
fieldname($(i), 'YourTable') as OldName,
subfield(fieldname($(i), 'YourTable'), '.', 2) as NewName