一种CLOB反常问题解决方案ITeye - 千亿集团

一种CLOB反常问题解决方案ITeye

2019年02月25日13时34分18秒 | 作者: 灵珊 | 标签: 句子,数据类型,解决方案 | 浏览: 403

这条句子总是报:ORA-00932: 数据类型不一致: 应为 -, 但却取得 BLOB
select * from (
  select rownum as r, t.* from (
  select a.id, a.dir, a.dirFlag, a.createTime, a.latelyTime, a.gcrms, a.title, a.siteName, a.status, b.name as statusName, l.name as defectLevelName, a.currentHandle, a.progressAndPlan, a.frontperson, ds.name as sourceName, c.fullname as currentHandleName, 
  case when a.occurrenceTime + (l.days - l.alert) sysdate then 0 else 1 end isOverTime from defect1 a left join user_info c on a.currentHandle = c.user_id,dir_status b,dir_defectlevel l,dir_source ds
  where 1 = 1  and a.status = b.id and a.status 99  and a.defectlevel = l.id and ds.id = a.source and createPerson=92 
order by createTime desc  ) t where rownum =  20 ) where r 0


解决方案:删掉distinct 去重复的单词
select * from (
  select rownum as r, t.* from (
  select distinct a.id, a.dir, a.dirFlag, a.createTime, a.latelyTime, a.gcrms, a.title, a.siteName, a.status, b.name as statusName, l.name as defectLevelName, a.currentHandle, a.progressAndPlan, a.frontperson, ds.name as sourceName, c.fullname as currentHandleName, 
  case when a.occurrenceTime + (l.days - l.alert) sysdate then 0 else 1 end isOverTime from defect1 a left join user_info c on a.currentHandle = c.user_id,dir_status b,dir_defectlevel l,dir_source ds
  where 1 = 1  and a.status = b.id and a.status 99  and a.defectlevel = l.id and ds.id = a.source and createPerson=92 
order by createTime desc  ) t where rownum =  20 ) where r 0






版权声明
本文来源于网络,版权归原作者所有,其内容与观点不代表千亿集团立场。转载文章仅为传播更有价值的信息,如采编人员采编有误或者版权原因,请与我们联系,我们核实后立即修改或删除。

猜您喜欢的文章