In程序使用SQLExecDirect 执行查询
SELECT
q.record_id as record_id,
s.scenariusz as scenariusz,
u.usluga as usluga,
u.priorytet as priorytet,
q.vip as vip,
q.date_added as date_added,
q.chat_server_session_id as chat_server_session_id
FROM
queue_webchat_messenger q
JOIN usluga u on u.id_uslugi = q.id_uslugi
JOIN scenariusz s on s.id_scen = u.id_scen
WHERE
q.id_agent_soft is NULL
AND q.state = 'KO'
ORDER by
u.priorytet desc,
q.id_uslugi,
q.vip desc,
q.date_added,
q.record_id;
在数据库日志(Oracle(中,我得到错误err=918
=====================
PARSE ERROR #139794508205160:len=450 dep=0 uid=178 oct=3 lid=178 tim=16259156390104 err=918
SELECT ROWID,q.record_id as record_id, s.scenariusz as scenariusz, u.usluga as usluga, u.priorytet as priorytet, q.vip as vip, q.date_added as date_added, q.chat_server_session_id as chat_server_session_id FROM queue_webchat_messenger q JOIN usluga u on u.id_uslugi=q.id_uslugi JOIN scenariusz s on s.id_scen=u.id_scen WHERE q.id_agent_soft is null AND q.state=:"SYS_B_0" ORDER by u.priorytet desc, q.id_uslugi, q.vip desc, q.date_added, q.record_id
CLOSE #139794508205160:c=0,e=2,dep=0,type=0,tim=16259156390850
=====================
在DB日志中,ROWID列被添加到查询中,我怀疑这一列导致了一个错误。是什么导致ROWID列被添加,是什么导致err=918?
请尝试添加一个假的ROWID列:
SELECT
q.record_id as ROWID,
q.record_id as record_id,
s.scenariusz as scenariusz,
u.usluga as usluga,
u.priorytet as priorytet,
q.vip as vip,
q.date_added as date_added,
q.chat_server_session_id as chat_server_session_id
FROM
queue_webchat_messenger q
JOIN usluga u on u.id_uslugi = q.id_uslugi
JOIN scenariusz s on s.id_scen = u.id_scen
WHERE
q.id_agent_soft is NULL
AND q.state = 'KO'
ORDER by
u.priorytet desc,
q.id_uslugi,
q.vip desc,
q.date_added,
q.record_id;