Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
livio218526
Creator
Creator

Replace String in another String

Hi Everyone,

I need to replace a string to another string, for example:

1) Pippo Franco

2) Pippo Franco/Ciccio Pasticcio

3)Pippo Franco/Pappa Pippo

....

I'd like to replace only the frank pippo string, leaving the remainder unchanged.

For example:

1)Pluto Topolino

2) Pluto Topolino/Ciccio Pasticcio

3)Pluto Topolino/Pappa Pippo

.....

Thanks,

Livio

1 Solution

Accepted Solutions
sunny_talwar

May be this

Replace(FieldName, 'Pippo Franco', 'Pluto Topolino') as FieldName

View solution in original post

6 Replies
tush
Creator II
Creator II

Hi,

     Please try Replace() :-

Ex:-

Replace('abccde','cc','xyz') returns 'abxyzde'

Load

Replace(FieldName,'TEST','123') as  RepField

From location;

sunny_talwar

May be this

Replace(FieldName, 'Pippo Franco', 'Pluto Topolino') as FieldName

sunny_talwar

You can also look into using MapSubString in the script

kkkumar82
Specialist III
Specialist III

You can use replace function

Replace(FieldName, What to be replaced, with what)

in your case for eg with hardcoded values

Replace('Pippo Franco/Ciccio Pasticcio','Pippo Franco',Pluto Topolino')

HTH

jerryyang756
Creator
Creator

Use Replace(text, from_str, to_str)

Replace('Pippo Franco','Pippo Franco','Pluto Topolino')

Replace('Pippo Franco/Ciccio Pasticcio','Pippo Franco','Pluto Topolino')

Replace('Pippo Franco/Pappa Pippo','Pippo Franco','Pluto Topolino')


In Script:

Capture.JPG

Replace(text field name, from_str, to_str)

https://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/Scripting/StringFunction...

cspindley
Contributor III
Contributor III

thanks, === in healthcare