Skip to main content
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.

1 Solution

Accepted Solutions
sunny_talwar

May be while loading...

LOAD ....

FROM .....

Where WildMatch(group_name, '*service-270*', '*service-271*');

View solution in original post

14 Replies
sunny_talwar

Do you only want to pull where attribute is 270 or 271?

Anonymous
Not applicable
Author

Yes.I only want those fields

sunny_talwar

May be while loading...

LOAD ....

FROM .....

Where WildMatch(group_name, '*service-270*', '*service-271*');

Anonymous
Not applicable
Author

Hi sunny,

I have tried that but it is throwing error as unknown statement.

sunny_talwar

Can you share a screenshot of the error and the script you have used?

Anonymous
Not applicable
Author

Hi sunny,

sorry for the late reply as i was out of the town.

I have tried with your wildmatch function at home using a sample data but didnt try at work.

I can attach the sample pic I have been using.

sample.png

regards,

Vamsi

sunny_talwar

Where statement goes after From

Capture.PNG

sample:

LOAD ....

FROM ....

WHERE ....;

Anonymous
Not applicable
Author

Thanks sunny It worked now.

I shall implement the same thing at work and will close this thread.

Much appreciated.

Anonymous
Not applicable
Author

Hi sunny,

I have used the same wildwatch function to pull the data but it is throwing error

cant able to make out where it went wrong as I have to use Two where conditions in my load script.

Here is the pic .and it is throwing these lines when i am loading the script.

SQL##f - SqlState: 42883, ErrorCode: 7, ErrorMsg: ERROR: function wildmatch(character varying, unknown, unknown) does not exist;

Error while executing the query

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 WildMatch(group_name, '*service-270*', '*service-271*')

services.png