Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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.
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