Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
danny4202001
Contributor II
Contributor II

How to remove everything before Hyphen along with -

Hello Team,

Please let me know how to remove everything before - Hyphen along with hyphen bold in below 

92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT

When I use this below script results seems right but Hyphen is still there

results ' - KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT'

right(Filed, len(field)-Index(Field, ' '))

Thanks,

D

Labels (3)
1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

 

Mid('92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT', Index('92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT','-',2),Len('92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT')-
Index('92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT','-',2))

 

Replace Value in Quote with your Field Name

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

3 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this.

 

Mid('92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT', Index('92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT','-',2),Len('92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT')-
Index('92961-2011- KG 400 CUDDLEBED W/R-TECH STAIN TREATMENT','-',2))

 

Replace Value in Quote with your Field Name

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
MarcoWedel

Is there a general rule to specify what part of all strings should be removed?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

You can use multiple such functions like, Subfield, String functions.

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!