I have a table with mostly character fields, but there are a couple of integer fields.
To make it easier on my users, I would like the default search option for the character fields to be ‘contains’.
If I make this the only option for the Quick Search, then ScriptCase is not smart enough to realize that you can’t do:
WHERE num LIKE '%1234%'
and I get an SQL error.
If I add the ‘equal’ option, then that option appears first in the list, and my users need to select the ‘contains’ option or try get a 20 character field exactly right.
I tried putting only the most used character fields in the quick search, and then including a full filter/search.
The problem with that, is when ScriptCase generates the SQL for the search, it includes ALL the fields from the search, even if the user hasn’t entered anything in them. So, if the user just wants to find ‘skid_number=1234’, either nothing is found because the criteria is ANDed with all the other fields=’’, or extra rows are found because the criteria is ORed with all the other fields=’’ (so it picks up anything that has a null in any of the fields).
Anybody got a suggestion on how to set this up?
Thanks.