How to fix the Oracle error PCC-02354: A file included with #include may not contain SQL statements?
In this post, you’ll learn more about the Oracle ErrorPCC-02354: A file included with #include may not contain SQL statements with the details on why you receive this error and the possible solution to fix it.
Oracle Error Description
PCC-02354: A file included with #include may not contain SQL statements
Reason for the Error PCC-02354: A file included with #include may not contain SQL statements
Cause: The Pro*C Precompiler reads header files referenced in #INCLUDE directives and uses the values defined in them. But the precompiler never generates code using statements in header files, so use of SQL statements in these files is illegal.
How to fix the Error PCC-02354: A file included with #include may not contain SQL statements ?
You can fix this error in Oracle by following the below steps
Action: Move the SQL statement(s) into the main body of the application or use EXEC SQL INCLUDE to check that the included file is precompiled.
Leave Your Comment