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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Use of wild cards in script to exclude data not working

Hi

Does anyone know how to go about excluding some data on load?

I want to exclude campaigns where the campaign name starts with '_series'. The statement below works when I type the whole campaign name in but as soon as I use a wild card to exclude all the campaigns that start with '_series' it stops working.

LOAD... ...WHERE campaign_name <> '_series*'

Any ideas?

Thanks.

4 Replies
vgutkovsky
Master II
Master II

Lisa,

Use function FindOneOf() or Left() to check this condition. If you want to use Left, for example, it would look like this:

LOAD...WHERE Left(campaign_name,7) <> '_series'


Regards,

Not applicable
Author

Thanks Vlad, that did the trick!

However there is another WHERE statement in my script and it seems that I can only use one at a time. If I comment one out the other works, but when used together I get an error.

Ideally I'd like:



WHERE

Left(CAMPAIGN_NAME,7) <> '_series'





WHERE

CAMPAIGN_DATE >= '23/02/2010 00:00:00';

Do you know how to solve this?

Many thanks!

Lisa

Not applicable
Author

You need to use AND for the second condition. So

where Left(CAMPAIGN_NAME,7) <> '_series'

and CAMPAIGN_DATE >= '23/02/2010 00:00:00';

Not applicable
Author

Thank you! It works. Don't know why I didn't think of it. I tried 'AND WHERE' and all sorts of things...

That's great. Thanks.