Adsense Ad

Friday, 19 May 2017

Oracle: ORA-01756 Error Message

ORA-01756 Error Message

Learn the cause and how to resolve the ORA-01756 error message in Oracle.

Description

When you encounter an ORA-01756 error, the following error message will appear:
  • ORA-01756: quoted string not properly terminated

Cause

You tried to execute a statement that contained a string that was not surrounded by two single quotes. One of the quotes was entered without the second accompanying quote.

Resolution

The option(s) to resolve this Oracle error are:

Option #1

Rewrite the statement so that the string is surrounded by two single quotes.
For example, if you had tried to execute the following SELECT statement:
SELECT supplier_id, supplier_name
FROM suppliers
WHERE supplier_name = 'IBM;
You would receive the following error message:
Oracle PLSQL
You can correct this SQL statement by surrounding the string (ie: IBM) with two single quotes as follows:
SELECT supplier_id, supplier_name
FROM suppliers
WHERE supplier_name = 'IBM';

No comments: