[Fix]-ORA-00911 invalid character xsql error
ORA-00911 invalid character xsql error
SQL query is used in the xsql file as shown below:
<?xml version="1.0" ?>
<page connection="labor" xmlns:xsql="urn:oracle-xsql">
SELECT id, name, dept, project_name FROM wikitechyEmp JOIN wikitechyProject ON wikitechyEmp.Id = wikitechyProject.id
ORA-00911: invalid character error occurs but the same query works well directly on the database.
This error may occur when the query is typed and pasted from an editor that contains non-printable characters. Hence delete the query and re-type the same directly in the xsql file.
Sometime there are chances that a special character appears in SQL WHERE clause and the value is not present within the single quotations. Hence the parse the query once to remove or handle special characters.
The special character other than $, _, and # may be in use with column name. Ensure that such column names are enclosed in double quotations.