Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

Qualify Name change

hi Community,

Due some reason I am using Qualify* for many tables and after qualify and Unqualify, I am trying to get original names.

LIke:

for ex I have fields like

tab1.A

tab1.B

tab2.A

tab2.B

tab3.C

how can I rename them like A,B,C... in script

_Priya

22 Replies
Chanty4u
MVP
MVP

try   unqualify *;

priyarane
Specialist
Specialist
Author

it won't work as columns are already qualified.

Anil_Babu_Samineni

Remove Qualify statement then? It will resolve issue. Not sure why are you used Qualify and again Rollback needed? Can you explain the logic behind

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
prma7799
Master III
Master III

Try to give alias name using resindent ..

Clever_Anjos
Employee
Employee

You can rename them using this How to Rename Fields using Mapping Table

priyarane
Specialist
Specialist
Author

I need to use qualify some reasons

priyarane
Specialist
Specialist
Author

there are 1000 of records I have in data, so can you give your thoughts like replacing 'Tab*.' with nothing

Clever_Anjos
Employee
Employee

This script will iterate over all tables and all columns creating a renaming table

Any table named Tab*.name will be renamed to 'name'

For i = 1 to NoOfTables()

  Let tb = TableName(i);

  For j = 1 to NoOfFields(TableName(i))

     let col = FieldName(j,tb);

     if col like 'Tab*' then

        renamingtable:

        load '$(col)' as from , SubField('$(col)','.',-1) as to AutoGenerate 1;

     endif

  Next

Next

map:

Mapping load * Resident renamingtable;

drop Table renamingtable;

RENAME Fields using map;

Be carefull with synthetic keys after that