DB2 一直报ERROR CODE: -203 ,SQL State:42702.麻烦大神们帮忙看看
selects.ArchiveID内部档案号,s.CreateDateTime创建时间,s.AuthTimeLimit授权时限,s.ArchiveStatus档案最终状态...
select s.ArchiveID 内部档案号,s.CreateDateTime 创建时间,s.AuthTimeLimit 授权时限 ,s.ArchiveStatus 档案最终状态,s.UpdateDateTime 状态变更时间 ,s.CurrentStatus 当前状态,s.CoreOrgNo 核心机构号,s.CoreUserCode 核心柜员号,s.DataOrgNo 授权发起机构号,s.DataUserCode 授权发起柜员号,s.AuthCode 核心发送的授权序号,
q.TradeCode 前端交易码,q.TerminalNo 核心逻辑终端号,q.TellerNo 柜员号,q.BrNo 机构号,q.ChannelDate 会计日期, q.IndexID 交易唯一索引,q.SttyIP 终端IP,ServiceType 终端类型,q.RemoteCause 授权原因,q.RemoteLevel 授权级别,
h.TerminalNo 核心逻辑终端号, h.Status 交易状态,h.Code 错误代码,h.Desc 失败原因,h.AuthResult 授权结果,h.AuthReason 授权意见,sqyj from Busi_ArchiveMain s //授权交易档案主表
left join Busi_CoreRequestMain q on s.ArchiveID=q.ArchiveID //核心请求主表
left join Busi_CoreResponseMain h on s.ArchiveID=h.ArchiveID //核心回复主表
left join (select ArchiveID,replace(replace(xml2clob(xmlagg(xmlelement(NAME ArchiveID, '审批柜员:'||AuthTeller||'-授权结果:'||case when AuthResult='backword' then '退回'
when AuthResult='reject' then '拒绝' else '其他' end ||'-授权意见'||AuthReason||'-授权时间:'||AuthStartTime||'~'||AuthEndTime||'@'))),'<ARCHIVEID>',''),'</ARCHIVEID>',' ') as sqyj
FROM Busi_ArchiveCheck where AuthResult in ('backword','reject')
GROUP BY ArchiveID) a on s.ArchiveID=a.ArchiveID //授权审批信息表
left join (select ArchiveID,replace(replace(xml2clob(xmlagg(xmlelement(NAME ArchiveID,ImageSaveID))),'<ARCHIVEID>','$'),'</ARCHIVEID>','#') as sqyj
FROM Busi_ArchiveImage GROUP BY ArchiveID)p on s.ArchiveID=p.ArchiveID 展开
q.TradeCode 前端交易码,q.TerminalNo 核心逻辑终端号,q.TellerNo 柜员号,q.BrNo 机构号,q.ChannelDate 会计日期, q.IndexID 交易唯一索引,q.SttyIP 终端IP,ServiceType 终端类型,q.RemoteCause 授权原因,q.RemoteLevel 授权级别,
h.TerminalNo 核心逻辑终端号, h.Status 交易状态,h.Code 错误代码,h.Desc 失败原因,h.AuthResult 授权结果,h.AuthReason 授权意见,sqyj from Busi_ArchiveMain s //授权交易档案主表
left join Busi_CoreRequestMain q on s.ArchiveID=q.ArchiveID //核心请求主表
left join Busi_CoreResponseMain h on s.ArchiveID=h.ArchiveID //核心回复主表
left join (select ArchiveID,replace(replace(xml2clob(xmlagg(xmlelement(NAME ArchiveID, '审批柜员:'||AuthTeller||'-授权结果:'||case when AuthResult='backword' then '退回'
when AuthResult='reject' then '拒绝' else '其他' end ||'-授权意见'||AuthReason||'-授权时间:'||AuthStartTime||'~'||AuthEndTime||'@'))),'<ARCHIVEID>',''),'</ARCHIVEID>',' ') as sqyj
FROM Busi_ArchiveCheck where AuthResult in ('backword','reject')
GROUP BY ArchiveID) a on s.ArchiveID=a.ArchiveID //授权审批信息表
left join (select ArchiveID,replace(replace(xml2clob(xmlagg(xmlelement(NAME ArchiveID,ImageSaveID))),'<ARCHIVEID>','$'),'</ARCHIVEID>','#') as sqyj
FROM Busi_ArchiveImage GROUP BY ArchiveID)p on s.ArchiveID=p.ArchiveID 展开
1个回答
推荐于2018-03-20
展开全部
ISPWD 在你使用的场景之中有误。
检查你的SQL语句之中的ISPWD,看看表中是否有这一对象。
db2 => ? sql206
SQL0206N "<name>" is not valid in the context where it is used.
Explanation:
This error can occur in the following cases:
* For an INSERT or UPDATE statement, the specified column is not a
column of the table, or view that was specified as the object of the
insert or update.
检查你的SQL语句之中的ISPWD,看看表中是否有这一对象。
db2 => ? sql206
SQL0206N "<name>" is not valid in the context where it is used.
Explanation:
This error can occur in the following cases:
* For an INSERT or UPDATE statement, the specified column is not a
column of the table, or view that was specified as the object of the
insert or update.
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询