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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
riyazasma1009
Creator
Creator

Renaming Multiple fields in Qlikview Script

Hi All,

I am loading the below fields in the load script editor:

A,

B,

C,

D,

E

I wish to rename fields A,B,C to Test.

Can anyone please help me with the same.

Thanks,

Asma

3 Replies
Anonymous
Not applicable

Hi,

Your field names will have to be unique for each table.

Unless you concatenate fields A B & C together and rename as Test.

If they do not belong to the same table:

rename Field A to Test;

or you can use mapname to rename multiple fields - See qlikview help file

If i have not understood your requirement fully please provide further details.

Thanks

petter
Partner - Champion III
Partner - Champion III

If you need to get the sum of the three fields into one field without tracking where the individual values came from you could simply do:

LOAD

     A + B + C AS Test1,   // If they are numbers

     A & ',' & B & ',' & C AS Test2,   // If they are strings

     D,

     E

FROM

     ......;

OR if you need to keep track of the origin field you could use the CROSSTABLE prefix:

CROSSTABLE( OrgField, Test, 2) LOAD

     D,

     E,

     A,

     B,

     C

FROM

     ....;

You will then get a resulting table of:

D, E, A, OrgField, Test

with 3x as many rows as the source but in the OrgField you will have a value of A, B or C depending on which field the value came from.

avinashelite

If A,B and C columns are from the same table then you cannot have the same field name for all the 3 fields , that's not allowed ..if its from the different table then try like

rename Field A to Test;

rename Field B to Test;

rename Field C to Test;


check this thread

How to Rename Fields

How to rename a field in qlikview