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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

PurgeChar not working

I have an ID field that is a key field that shows up across several input tables.  This ID, unfortunately, can have spaces in them.  But, if you have a space in it, I can't seem to get the Select on that field to work correctly.  So, I was thinking I wanted to purge all the spaces in the ID field in the load script.  Unfortunately, I am getting an error: SQL###f - SqlState: S0002, ErrorCode: 173, ErrorMsg:[Microsoft][ODBC Visual FoxProDriver]File 'purgechar.prg' does not exist.

What's going wrong?  Is there another way around this problem? 

Say for example, one of the IDs that I am trying to select is 'AB  6766', and there are other records that start 'AB', it will select all of those records, instead of just the one that I told it.

Thanks in advance.

1 Reply
danielrozental
Master II
Master II

Purgechar is a QlikView Function not a Foxpro one. You should use it in the LOAD part of your statement not in the SQL SELECT.

LOAD Purgechar(ID,'CHARS') AS ID

SQL SELECT ID

FROM TABLE;

Using purgechar after the SQL sentence will cause an error.