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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Remove Records from QVD

This is so simple yet I can't get it to remove records when loading a QVD. In the QVD there is a field "CustomerName", when I load the QVD I want to remove any records where the CustomerName contains the word "sample" no matter where it is located in the string. I have tried WHERE CustomerName <> '*sample*', WHERE CustomerName Not Like '*sample*' and others with no luck. What am I doing wrong?

Thanks,

Stephen

Labels (1)
1 Solution

Accepted Solutions
erichshiino
Partner - Master
Partner - Master

Try:

WHERE substringcount( CustomerName, 'sample')=0

View solution in original post

3 Replies
erichshiino
Partner - Master
Partner - Master

Try:

WHERE substringcount( CustomerName, 'sample')=0

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Stephen,

The substringcount function will do the trick, as will index.  Be aware though that this will cause the QVD to load in a non optimized mode.  For a one of cleaning of your QVD this is fine, but if it is something you need in production then you should create a separate field in the QVD on creation called IsSample or something and then do a WHERE EXISTS on that.

Search the community for Optimized QVD Load and you should find plenty of articles.

- Steve

Not applicable
Author

Thanks Erich and Steve. The substringcount worked. Depending on what we are using the table for, sometimes we need the 'Sample' accounts sometimes we don't.

Stephen