Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Exclude 'TEST'-user from table when loading script

Hi

I have a key-table of users (userID) and all post that are associated with the user TEST are garbage. How can I exclude these posts when I load the script?

LOAD

userID

....

....

FROM....

Thanks!

4 Replies
richard_chilvers
Specialist
Specialist

Hi

If I have understood your requirement, you can use the WHERE clause in your LOAD to exclude the TEST users. You might need to use one of the string functions (for example, you might need to check if TEST is anywhere within the userID field).

Hope that helps.

vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi ,

You can use function Substringcount in where clause,

Load

USERID,.

..

..

From ABC Where Substringcount(Upper(USERID),'TEST')=0;

I used upper function to convert USERID to uppercase while matching.

Hope this will help.

Regards

VIjay

Not applicable
Author

Hi

Thanks. "Where substringcount" works well.

Just one more thing. In the script I load from 3 diffrent databases wich all includes tables with user id´s but with diffrent tablename in each of the 3 databases. I merge them into a single new table with ..."as UserID"

How do I apply the substringcount to the new table (UserID).

I´m knew to this so all help are usefull.

vijay_iitkgp
Partner - Specialist
Partner - Specialist

If you are concatenating all three tables then use this function at each table in where clause with Actual Name of USERID field.

regards

VIjay