Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to avoid the some rows coming in a particular column when pulling from the database

Hi,

I have a table with services.pngmany rows in a particular columsn.

My requirement is I have to avoid or fish out only particular rows from a particular column onto the qlivkiew table.

Wondering how can do I do that in the load script.

I am attaching the picture for your reference.

I want to have only the green color fields in the list box not the red colored one.

Any help is highly appreciated.

regards,

Vamsi.

14 Replies
sunny_talwar

Since you are now doing this in the SQL, you need to use SQL equivalent of WildMatch which I think is using Like....

So something like this

SQL SELECT *

  , to_char(recorded_at,'Mon-YYYY') AS date_selector

  , to_char(recorded_at,'YYYYMM') AS date_selector_1

FROM "myhealth_production"."public"."statistic_counters"

Where group_name not in ('Conversation', 'Message') and

          (group_name Like '*service-270*' or group_name Like '*service-271*');

May be you don't need the first statement now because you have more restrictive 2nd statement on group_name. So, this:

SQL SELECT *

  , to_char(recorded_at,'Mon-YYYY') AS date_selector

  , to_char(recorded_at,'YYYYMM') AS date_selector_1

FROM "myhealth_production"."public"."statistic_counters"

Where (group_name Like '*service-270*' or group_name Like '*service-271*');

Anonymous
Not applicable
Author

Hi sunny,

It is not throwing error but unless i use Where group_name not in ('Conversation', 'Message') statement , I am not getting any values in the group name. All those '*service-270*' or group_name Like '*service-271 data is inside the group name  which are not in the 'conversation and message' .Dont know how to do this.services.png dat

stabben23
Partner - Master
Partner - Master

in sql, use % instead of *

Anonymous
Not applicable
Author

Thanks Staffan .It worked fine now.

Anonymous
Not applicable
Author

Thanks sunny It worked fine now.

Great stuff.

Really appreicated.