Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

New Contributor III

Automatic unique field names

I am trying to import database which is exported from some ERP  system and some of the field names repeat themselves in a single table.

Is there a way to automaticaly make this fields unique (so when I try to import table for this fields to be identified and renamed)?

it is easy if you happen to have just few fields, but this tables come with hundreds of fields and it is quite time consuming to identify why error occurs exactly (my current process is to copy all field names into excel, sort it and visually find fields with same names).

2 Replies

Re: Automatic unique field names

You couldn't do it directly within a qlik load-statement. You will need an additionally routine which reads the fieldnames from the table and checked then within a loop if this fieldname already exists and if yes add an additional counter and then concat this fieldname-output within a variable which is then used as fieldlist within the real data-load.

But if possible you should try to fix it within the database.

- Marcus

New Contributor III

Re: Automatic unique field names

this is actually good suggestion (little bit complicated but possible)


p.s. it is not possible to influence export and take care that field names are unique during export

Community Browser