Toad World® Forums

Table Filter Comments


#1

Hi,

Need help with table filters.

When in table view I use multiple search criteria and inorder to keep them intact I comment the search criteria by suffixing it with “–”

However when more than two search criteria is commented as in the attachment, and no search criteria I get an expression error.

I can save the searches but thats not the option I plan to opt for.

Any help advises/pointers will be great help.
Toad Error.jpeg


#2

If you turn on Database -> Spool SQL -> Spool to Screen, you’ll see why. Toad is seeing some text in your filter and sticking a “WHERE” before it. In my test, it looked like this:

SELECT

ROWID, empno, ename, job,

mgr, hiredate, sal,

comm, deptno

FROM jdorlon.emp

Where

– ename like ‘%S%’

– job like ‘%S%’

As a workaround, just make the first like of your filter “1=1” and don’t comment it.