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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Load Script - Compress strings with Spaces

Hi All

I am loading some data into a QVsolution. I have a postcode field which contains a postcodes with spaces in and ones without. In the load Script i an trying to iradicate this by using the function as you would in SAS. But this doesn't work.

COMPRESS(Postcode)           AS           POSTCODE,

I want to get all the strings that have a spave in them and remove the space. See example below

Original Data

IDPostcode

1

WF4 4NQ
2WF4 5TH

Desired Data

IDPostcode
1WF4 4NQ
2WF4 5TH

Thanks

James

1 Solution

Accepted Solutions
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Try this

LOAD ID, Replace(Postcode,' ','') as Postcode

;

View solution in original post

1 Reply
jagannalla
Partner - Specialist III
Partner - Specialist III

Hello,

Try this

LOAD ID, Replace(Postcode,' ','') as Postcode

;