Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to filter a column in Oracle Sql Developer

Let's say I have some timestamp fields in a column that look like this "02-JUL-14 10.36.07.713000000 PM".

Is there a way for me to left-click the column in that table and do a search that contains "JUL" so that I only have rows show up that contain "JUL"?

I have read articles of people saying to include % and ' characters around the word, and using the LIKE ' ' syntax, but nothing has worked out for me.

So in the picture below, I wish I could just type in "JUL", and only rows with the TIME_OF_ENTRY column that contain the letters "JUL" will appear.

I do realize that typing in the filter window below is an EXACT search, but I want to know if there is a way to do a "contains" type of search.

enter image description here

like image 503
joshpt Avatar asked Jul 03 '14 16:07

joshpt


People also ask

What is filter condition in Oracle?

Oracle Expression Filter, a feature of Oracle Database 10g, is a component of Rules Manager that allows application developers to store, index, and evaluate conditional expressions (expressions) in one or more columns of a relational table. Expressions are a useful way to describe interests in expected data.

How do I remove a filter in SQL Developer?

Removing Filters To remove the schema filter, right-click hr_orcl and select Clear Filter. Expand the Indexes node. The schema filter is removed. To remove the filter applied to the Tables node, right-click Tables and select Clear Filter.


3 Answers

Paste

like '%JUL%'

in the filter field, and whatever values in that column which contain "JUL" will show up.

The http://www.thatjeffsmith.com/archive/2011/11/sql-developer-quick-tip-filtering-your-data-grids/ link from @OldProgrammer contained the solution that I found. There may be more helpful things in that link for more advanced filtering, perhaps.

like image 157
joshpt Avatar answered Oct 23 '22 08:10

joshpt


Type

to_char(TIME_OF_ENTRY) like '%JUL%'

in the filter field above.

like image 30
Erich Kitzmueller Avatar answered Oct 23 '22 07:10

Erich Kitzmueller


The statement to_char(fieldname) like `%likevalue%` worked for me using NetBean 8.0.2. I pasted it into the main filter field at the top of the page with an appropriate fieldname and likevalue and made sure that the individual filter fields were cleared. I removed the percent signs when I didn't need them.

like image 33
scvblwxq Avatar answered Oct 23 '22 08:10

scvblwxq