Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
April 13–15 - Dare to Unleash a New Professional You at Qlik Connect 2026: Register Now!
cancel
Showing results for 
Search instead for 
Did you mean: 
datanibbler
Champion
Champion

RENAME USING - with QUALIFY?


Hi,

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?

Thanks a lot!

Best regards,

DataNibbler

1 Reply
marcus_sommer

Hi DataNibbler,

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

     Autogenerate 1;

next

RenameMap:

Mapping Load * Resident temp;

drop tables temp;

- Marcus