APEX : ORA-01008: not all variables bound

It is really frustrating if everything run not as per plan right?..:-)

Today I encounter error ORA-01008: not all variables bound, when executing a report from a SQL script. At first, I suspected because of a LEFT JOIN syntax problem.
What Oracle say about ORA-01008?
ORA-01008: not all variables bound
Cause: A SQL statement containing substitution variables was executed without all variables bound. All substitution variables must have a substituted value before the SQL statement is executed.
Action: In OCI, use an OBIND or OBINDN call to substitute the required values.
I not really understand it much. But below solution works well for me on my APEX application. And the report generation have no problem any more.
Initially, my SQL code was as below:

where employee = :P1_EMPLOYEE


where employee = v(‘P1_EMPLOYEE’)

Have a good day!

2 Replies to “APEX : ORA-01008: not all variables bound”

  1. It's the easiest and simplest and greatest :)))) solution that I found for this problem. Thanks for saving me hours!

Leave a Reply

Your email address will not be published. Required fields are marked *