ORA-00911: invalid character
103316Jul 17 2003 — edited Oct 10 2006If 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,