hazelsisson
Programmer
Hello,
I have a stored sql query used in a report. Parameters are passed to it and all work apart from this line:
e.org_id is a numeric column in the table.
_orgs is a string that can be blank, or can contain any number of integers separated by commas (e.g. "18, 20, 21, 22, 24, 25").
The problem is that if _orgs is not blank, I get the error ORA-01722: invalid number.
I kind of understand that it is because _orgs is a string and it doesn't automatically convert the string to a list of integers.
Do you have any ideas on how can I overcome this problem, either by changing the value of _orgs (which is generated by a function) or altering the stored query?
Many thanks,
Hazel
I have a stored sql query used in a report. Parameters are passed to it and all work apart from this line:
Code:
and e.org_id IN (:p_orgs)
e.org_id is a numeric column in the table.
_orgs is a string that can be blank, or can contain any number of integers separated by commas (e.g. "18, 20, 21, 22, 24, 25").
The problem is that if _orgs is not blank, I get the error ORA-01722: invalid number.
I kind of understand that it is because _orgs is a string and it doesn't automatically convert the string to a list of integers.
Do you have any ideas on how can I overcome this problem, either by changing the value of _orgs (which is generated by a function) or altering the stored query?
Many thanks,
Hazel