Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-00911: invalid character

103316Jul 17 2003 — edited Oct 10 2006
If I input the following, I get an "ORA-00911: invalid character" error:

select info_id from information where info_id = %;

If I insert '1' instead of '%', it works, obviously. Info_id field is number(10). Is there a way for one to indicate a wildcard instead of opting not to include the field in a query? Overall idea here is that I've got a form in which the user inputs values for the fields offered (info_id, outcome..for instance). If the user inputs '100' for outcome but ignores the info_id field, I'd like the default to be a wildcard: i.e.,

select info_id, outcome
from nformation
where info_id = '%*?' and outcome = 100;

..instead of only:

select info_id, outcome
from information
where outcome = 100;

It's occured to me to insert info_id IS NOT NULL instead; but that isn't going to work for me. Thank you,
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 7 2006
Added on Jul 17 2003
4 comments
1,122 views