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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
raju_salmon
Creator II
Creator II

Replacing some text in field

Hi,

Please help to get result for below scenario. I have field called location where some paths are available. I need to keep all paths started with C: or c: as it is and remaining drives i need to replace with 'OtherThanC'

EX: Original values - f:\link\linkng630

Result should be - OtherThanC:\link\linkng630

 

Location
U:\Users\Center\appdata\roaming\microsoft\windows\start menu\programs\startup
u:\users\center\appdata\roaming\microsoft\windows\start menu\programs\startup
V:
v:
v:\program files
v:\program files\dbs
f:\link\linkng630
f:\link\linkng630\lng
D:\program files (x86)
d:\program files (x86)
c:\windows\syswow64\adobe\director
C:\windows\syswow64\adobe\shockwave 12
c:\windows\syswow64\adobe\shockwave 12
c:\windows\syswow64\adobe\svg viewer
c:\windows\syswow64\adobe\svg viewer 3.0

I have tried using replace, subfield functions but cannot able to get this result. This is sample data and path could be anything irrespective of depth of path.

Can anyone help me how to create new field using 'Location' field to get accurate result?

Thanks alot.

Raju

Labels (1)
10 Replies
rubenmarin

Hi Raju, also with the Subfield function:

subfield(Location, '\', -1)