LMSouq
moodle-core Open

Existing DB2 column reported as not being a column of the table

MA
Marius Butuc
1 month ago
3 views
Problem Description
In a Moodle 2 install running on DB2, deleting a user is unsuccessful, returning an *error reading from database*: > Debug info: [IBM][CLI Driver][DB2/LINUXX8664] SQL0206N "USERIDFROM" is not valid in the context where it is used. SQLSTATE=42703 SQLCODE=-206 SELECT * FROM mdl_message WHERE useridfrom = ? ORDER BY timecreated [array ( 0 => '28521', )] The error description for [SQL0206N][1] is clear, but `useridfrom` is a column of `mdl_message`: $ db2 describe table mdl_message Data type Column Column name schema Data type name Length Scale Nulls ------------------------- --------- ------------------- ---------- ----- ------  ID SYSIBM BIGINT 8 0 No  USERIDFROM SYSIBM BIGINT 8 0 No  USERIDTO SYSIBM BIGINT 8 0 No  SUBJECT SYSIBM VARCHAR 200 0 Yes  FULLMESSAGE SYSIBM VARCHAR 200 0 Yes  FULLMESSAGEFORMAT SYSIBM SMALLINT 2 0 Yes  FULLMESSAGEHTML SYSIBM VARCHAR 100 0 Yes  SMALLMESSAGE SYSIBM VARCHAR 200 0 Yes  NOTIFICATION SYSIBM SMALLINT 2 0 Yes  CONTEXTURL SYSIBM VARCHAR 200 0 Yes  CONTEXTURLNAME SYSIBM VARCHAR 200 0 Yes  TIMECREATED SYSIBM BIGINT 8 0 No 12 record(s) selected. What else could cause this error? [1]: http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.messages.sql.doc/doc/msql00206n.html

AI-Generated Solution

Powered by LMSouq AI · GPT-4.1-mini

✓ Solution Ready
Analyzing problem and generating solution…
Was this solution helpful?
Back to Knowledge Base