Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
EvanBarrick
Contributor

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
mwoolf
Honored Contributor II

Re: Trim a String in Script

load

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

 

1 Reply
mwoolf
Honored Contributor II

Re: Trim a String in Script

load

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