Troubleshooting
Problem
When running an SQL query on a KSK table in the Warehous database, the error SQL0206N is returned.
SQL0206N "
Symptom
When running an SQL query on the Warehous database tables with a column name specified in the SQL, the error SQL0206N is returned. For example,
db2 "select Node from ITMUSER.KSK_database"
SQL0206N "NODE" is not valid in the context where it is used. SQLSTATE=42703
If you do not specify a column name, the command will work. For example, this command will work:
db2 "select * from ITMUSER.KSK_database"
Cause
The column names in the warehouse database tables have double quotes as part of the name. The double quotes are not visible, however. In the example above, the column name is "Node", with the double quotes as part of the name.
Resolving The Problem
The column name is case sensitive and must be specified with the double quotes. For example, specify the SQL as followed:
db2 "select \"Node\" from ITMUSER.KSK_database"
The command specifies the column name as "Node", and the double quotes must be escaped with the forward slash (\).
Was this topic helpful?
Document Information
Modified date:
17 June 2018
UID
swg21966459