Skip to main content

Posts

Showing posts from April, 2014

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
Solution: 
where employee = v('P1_EMPLOYEE')
Have a good day!