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

Trim a String in Script

I have a field called 'ITEM'

There are certain 'ITEMS' that are in the data that I would like to trim the end of the string of characters in certain rows of data.

For example, 

ITEM

Salad

Salad - Regular

I want to trim the results where ITEM ends in ' - Regular' and just return 'Salad'

How can I do this in my load script?

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

load

Replace(ITEM, ' - Regular','') as Whatever

 

View solution in original post

1 Reply
m_woolf
Master II
Master II

load

Replace(ITEM, ' - Regular','') as Whatever