Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

renaming a specific value when loading the data

Hello all,

I have the problem below:

I am loading two different tables where the same value is written differently

( eg on the first table is called Client_A and on the 2nd is called ClientA)

is there any way to write on the loading script that wheneever meets value ClientA to rename it to Client_A?

Regards,

Savvas

1 Solution

Accepted Solutions
Not applicable
Author

You need to write the following mapping statement just before the first load statement in your script:

MAPPING:

MAPPING LOAD * inline [

Old ,New

ClientA, Client_A];

map [FieldName] using MAPPING;

Just replace [FieldName] with the actual FieldName in your script. Remember to write the above script before your normal load statement.

This way you can replace not only one but more records.

Regards,

Vineet Agarwal

View solution in original post

5 Replies
Miguel_Angel_Baeyens

Hello Savvas,

To rename one field in the loading process do the following

LOAD Client_A, Field2;SQL SELECT Client_A Field2FROM Database.Table; LOAD ClientA AS Client_A, Field3;SQL SELECT ClientA, Field3FROM Database.Table2;


Hope that helps

Not applicable
Author

You need to write the following mapping statement just before the first load statement in your script:

MAPPING:

MAPPING LOAD * inline [

Old ,New

ClientA, Client_A];

map [FieldName] using MAPPING;

Just replace [FieldName] with the actual FieldName in your script. Remember to write the above script before your normal load statement.

This way you can replace not only one but more records.

Regards,

Vineet Agarwal

Not applicable
Author

hmm I think I was not clear enough. I dont want to rename a field but I want to rename a certain value within the field.

for example I have a field in both tables called Customer. In this field on the 1st table I have the values Client_A, Client_B etc..

on the 2nd table I have tha values ClientA, ClientB etc... and when I join them in Qlikview this creates a problem since Qlikview cannot understand that Client_A=ClientA.

so what I was thinking is if I could rename the values ( not the name of the fields) while loading them in the system. if you want I can post two excel files with samples of my two tables.

thanks again!

Not applicable
Author

Mapping load will rename the values and not field names. I have suggested this assuming that you have a particular field say X and values are Client_A and Client(A).

Regards,

Vineet Agarwal

Not applicable
Author

Tnanks Vineet!! it worked!