Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Loeckli
Contributor III
Contributor III

Change String Value in Colum

Hello 

 

I have a table called A, in this table there is a colum called NAME. 

I'm trying to change in this colum all the strings 'lop' to 'pol' and storing them again under the colum NAME in the Table A.

A:
Load
*,

Replace(NAME,'lop','pol')

 

resident A;

This code does not give me the desired output.

How can I achieve this in the data editor ?

Labels (3)
1 Solution

Accepted Solutions
marcus_sommer

It's easily possible by using: Replace(NAME,'lop','pol') as NAME and specifying all other wanted/needed fields explicitly within the load.

Doing everything explicitly would be best practice. If you want to go a more lazy way by using a wildcard for the fields you need some extra efforts, for example:

X: Load *, Replace(NAME,'lop','pol') as X resident A;
drop tables A; drop fields Name; rename fields X to NAME;

Beside this I suggest to apply this transformation already in the origin load of A and not wasting resources by doing it within an extra step.

View solution in original post

1 Reply
marcus_sommer

It's easily possible by using: Replace(NAME,'lop','pol') as NAME and specifying all other wanted/needed fields explicitly within the load.

Doing everything explicitly would be best practice. If you want to go a more lazy way by using a wildcard for the fields you need some extra efforts, for example:

X: Load *, Replace(NAME,'lop','pol') as X resident A;
drop tables A; drop fields Name; rename fields X to NAME;

Beside this I suggest to apply this transformation already in the origin load of A and not wasting resources by doing it within an extra step.