Skip to Content
0
Former Member
Mar 25, 2009 at 08:46 PM

Invalid Relational Operator

561 Views

Hi All,

In my query, I'm trying to set up my Free-Hand SQL query to accept a prompt and either check the column against the values in the prompt, or if the prompt is equal to XXXX just display all:

select *

from invoice

where company_code in @prompt('Enter Company Code(s) separated by a semicolon or XXXX:', 'a', {' '}, multi, free) or @prompt(''Enter Company Code(s) separated by a semicolon or XXXX:', 'a', {' '}, multi, free) = 'XXXX'

When I pass a single company code, or XXXX the query executes fine. When i enter multiple company code values, I get the error message:

Exception: DBD, ORA-00920: invalid relational operator

State: N/A

and the really odd thing is if i remove everything after the OR - the query will accept mulitple or single codes with no issue.

Any advice?

Thanks!