How to fix the Oracle error ORA-06573: Function string modifies package state, cannot be used here?
In this post, you’ll learn more about the Oracle ErrorORA-06573: Function string modifies package state, cannot be used here with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
ORA-06573: Function string modifies package state, cannot be used here
Reason for the Error ORA-06573: Function string modifies package state, cannot be used here
There are two possible causes for this message:
* A SQL statement references a packaged, PL/SQL function that does not contain a pragma containing the ‘Write no Package State’ (WNPS).
* A SQL statement references a stand-alone, PL/SQL function that modifies a package state. A stand-alone, PL/SQL function referenced by a SQL statement cannot modify a package state.
How to fix the Error ORA-06573: Function string modifies package state, cannot be used here ?
You can fix this error in Oracle by following the below steps
If the function is a packaged, PL/SQL function: Recreate the function and include a pragma containing the ‘Write no Package State’ (WNPS). If the function is a stand-alone, PL/SQL function: Delete the function from the SQL statement.
Leave Your Comment