Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you receive this error message, you can take actions to resolve the issue.

...

Description

The following is an example.

Table Definition:

...

Based on the example, the following queries can cause the error: Column 'xxxx' cannot be resolved:

Code Block
languagesql
linenumberstrue
SELECT id1 FROM tbl;
Column 'id1' cannot be resolved

or

Code Block
languagesql
linenumberstrue
SELECT id FROM tbl WHERE id="123" ;
Column '123' cannot be resolved

...

Cause

Column 'id1' does not exist (the column specified in the SQL query is incorrect).

...

Double quotations are used to contain the string in the WHERE clause. Double quotations can be used only to specify the column name.

...

Resolution

Use correct column name in SQL query.

Code Block
languagesql
linenumberstrue
SELECT id FROM tbl;

or

Use single quotations around strings values.

Do not use any quotations when specifying a number.

Code Block
languagesql
linenumberstrue
SELECT id FROM tbl WHERE id=123 ;

...