Filtering grid data with LIKE condition

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
brezanac
Posts: 33
Joined: Thu 09 Jan 2014 14:52

Filtering grid data with LIKE condition

Post by brezanac » Thu 09 Jan 2014 15:15

Hello. I am currently evaluating the Professional version of dbForge for MySQL and I have to say that I am really impressed. Database syncing options and stuff like Cached Updates Mode (something I've been looking for ages) are real life savers.

However after extensive search I was unable to find an option which would allow me to create a "contains" filter when working with table data displayed in the grid view, View -> Data Window -> (drag & drop table from the list of available tables) -> (right click) -> Quick Filter -> Condition). This basically means that I need to set a

Code: Select all

LIKE('%stuff_I_am_looking_for%')
filter but inside the grid view display. Currently it seems like no matter what I choose (type of column etc.) I only get filters which enable me to match an exact value, less or greater values etc. but not the records which contain a particular sequence of characters.

Is it possible to create that kind of filter without resolving to issuing SQL queries in the query window? "Contains", "begins with" and "ends with" filters would be really great in the grid view.

Thank you.

brezanac
Posts: 33
Joined: Thu 09 Jan 2014 14:52

Re: Filtering grid data with LIKE condition

Post by brezanac » Thu 09 Jan 2014 16:05

One simply feels stupid after going through all the fuss of registering on the forums and posting a question just to find out the answer to his question after that :(

The option which I am looking for can be found once clicked on the small filter icon in the column header followed by clicking on (Custom) which reveals the Custom AutoFilter dialog. One of the filter options there says "Is like". The "begins with" and "end with" filters can obviously be created by using the appropriate % sign combinations (search_term% for "begins with" and %search_term for "ends with").

brezanac
Posts: 33
Joined: Thu 09 Jan 2014 14:52

Re: Filtering grid data with LIKE condition

Post by brezanac » Thu 09 Jan 2014 16:25

Ok here is something strange. The "Is like" filter option is only available for non-TEXT fields which means I can use it for VARCHAR fields but not for TEXT or MEDIUMTEXT. To make things even more strange once I apply a successful "Is like" filter to a VARCHAR column I am only left with "Is Null" and "Is Not Null" option for all the TEXT/MEDIUMTEXT fields.

Is this normal? I don't know about a reason which would prevent me from issuing a query like

Code: Select all

SELECT * FROM table WHERE content LIKE('%search_term%')
where content would be of type TEXT.

.jp
Devart Team
Posts: 345
Joined: Wed 09 Sep 2009 06:55
Location: devart

Re: Filtering grid data with LIKE condition

Post by .jp » Fri 10 Jan 2014 10:29

Hello!

Sorry for the late reply.

Please open the Custom Autofilter window, to use a filter that contains a specific sequence of symbols. To do this, in the column header, click the filter icon, and then select Custom. The Custom Autofiler window will appear. Use this window to set the conditions e.g. Is Like %stuff_I_am_looking_for%

BR.

brezanac
Posts: 33
Joined: Thu 09 Jan 2014 14:52

Re: Filtering grid data with LIKE condition

Post by brezanac » Fri 10 Jan 2014 15:35

Thanks for the reply!

However I am still facing a really weird problem with this inability to use "like" type filters on TEXT and MEDIUMTEXT column types. Please take a look at the attached pictures (click to enlarge) where you can see what I am talking about.

VARCHAR fields work as expected and have all kinds of "like" options ("begins with", "ends with" etc.) but none of the TEXT types has.

Image Image

alexa

Re: Filtering grid data with LIKE condition

Post by alexa » Wed 15 Jan 2014 13:27

This issue is fixed in dbForge Studio for MySQL, v.6.1 beta http://www.devart.com/news/2013/dbforge ... sql61.html

brezanac
Posts: 33
Joined: Thu 09 Jan 2014 14:52

Re: Filtering grid data with LIKE condition

Post by brezanac » Sun 19 Jan 2014 21:22

The Filter Editor now displays all the options for TEXT fields however still none of those is available when a column filter icon for a TEXT field is clicked.

Image

alexa

Re: Filtering grid data with LIKE condition

Post by alexa » Wed 05 Feb 2014 17:15

We would like to let you know that we have released the new build 6.1.154 of dbForge Studio for MySQL where the issue you reported is fixed http://www.devart.com/dbforge/mysql/stu ... nload.html

Thank you for your help in improving dbForge Studio for MySQL.

Post Reply