ORA-00932: 数据类型不一致: 应为 -, 但却获得 CLOB

紧接第上篇文章。
第一步:查看SQL语句。
修改语句成:
select a.id,
b.name as statusName,
a.currentHandle,
a.progressAndPlan,
a.customerService,
c.fullname as customerServiceName,
c.fullname as currentHandleName
from defect1 a
left join user_info c on a.customerService = c.user_id
and a.currentHandle = c.user_id,
left join site1_attr e on a.siteID = e.site_id, dir_status b
where 1 = 1
and a.status = b.id
and a.createTime >=
to_date('2012-03-01 00:00:00', 'yyyy-mm-dd HH24:mi:ss')
and a.createTime <=
to_date('2012-03-31 23:59:59', 'yyyy-mm-dd HH24:mi:ss')
and a.B_versionName = 'OCS R002C01LG0309 '
order by createTime desc

第二步:连接语句中的每一张表是否有重复对应id。
select count(*) from defect1,(user_info,site1_attr ).
发现site1_attr 中有重复id.

第三步:查看SQL语句发现:
site1_attr e 这张表,前后语句都没有用。

第四步:删掉:
left join site1_attr e on a.siteID = e.site_id,

第五步:执行成功。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值