joshpt joshpt - 3 months ago 49
SQL Question

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

Answer

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.