ORA-00955:名称已由现有对象使用

任继袁 2018-01-26 10:30:22
create or replace view tmdetectionrecord as
select "LINEID","OPERUNITID","ERECTTYPE","ASSETPROPERTY","OPERATIONDATE","SPECIALTYCLASSIFICATION","VOLTAGELEVEL","LINENAME","OPERUNIT","TOWERNO","DETECTIONTYPE","DETECTIONRESULT","DETECTIONTIME","EMOSUNIT" ,"EMOSUNITNAME"
from (select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
grm.towerNO,grm.inspectionWorkType as detectionType,grm.conclusion as detectionResult,grm.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmGruondResistanceMeasurement grm on grm.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
wod.observationTowerNO as towerNO,wod.inspectionWorkType as detectionType,wod.conclusion AS detectionResult,wod.observationTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmWaveObservationDistance wod on wod.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
cr.towerNO as towerNO,cr.inspectionWorkType as detectionType,cr.conclusion AS detectionResult,cr.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmCrackRecord cr on cr.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
ir.towerNO as towerNO,ir.inspectionWorkType as detectionType,ir.conclusion AS detectionResult,ir.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmIcingRecord ir on ir.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
mpr.towerNO as towerNO,mpr.inspectionWorkType as detectionType,mpr.conclusion AS detectionResult,mpr.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmMetalPartsRecord mpr on mpr.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
wsre.towerNO as towerNO,wsre.inspectionWorkType as detectionType,wsre.conclusion AS detectionResult,wsre.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmWireSagRecord wsre on wsre.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
cre.towerNO as towerNO,cre.inspectionWorkType as detectionType,cre.conclusion AS detectionResult,cre.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmCrossRecord cre on cre.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
iir.towerNO as towerNO,iir.inspectionWorkType as detectionType,iir.conclusion AS detectionResult,iir.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmInsulatorInfluenceRecord iir on iir.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
olr.profilesection as towerNO,olr.inspectionWorkType as detectionType,olr.conclusion AS detectionResult,olr.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmOverheadLineRecord olr on olr.lineID = ast.Id

union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
ttr.towerNO as towerNO,ttr.inspectionWorkType as detectionType,ttr.conclusion AS detectionResult,ttr.workTime as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmTowerTitlRecord ttr on ttr.lineID = ast.Id
union all
select ast.Id as lineID,ast.belongCity as operUnitID,ast.erectType,ast.assetProperty ,ast.operationDate,ast.specialtyClassification,
ast.voltageClass as voltageLevel , ast.lineName, ast.belongCityName as operUnit,
'' as towerNO,ler.inspectionWorkType as detectionType,ler.conclusion AS detectionResult,ler.measureDate as detectionTime,ast.eomsUnit as emosUnit,ast.eomsUnitName as emosUnitName
from AstLineAssetInfoS ast
join TmLoadElectricalRecord ler on ler.lineID = ast.Id
) ast
where ast.erectType <> 3 and ast.assetProperty != 05
and ((ast.voltageLevel >= 25 and ast.voltageLevel<=45) or ast.voltageLevel>=76)
and ast.specialtyClassification = 01
and ast.operationdate < sysdate;

...全文
1506 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
把问题反馈给数据库管理的人,到底改那个由他来确定。你自己改了 可能程序会报错
zcs_zzh 2018-01-26
  • 打赏
  • 举报
回复
数据库中有一个其他类型的对象名称和你这个视图的名称冲突了,把问题反馈给写代码的人来解决,你不用处理,也不能随意修改名字,否则应用程序可能会有问题。
卖水果的net 2018-01-26
  • 打赏
  • 举报
回复
引用 3 楼 weixin_41677211 的回复:
[quote=引用 1 楼 wmxcn2000 的回复:]

select * from user_objects where object_name = upper('tmdetectionrecord')
查询后要如何处理啊[/quote] 如果查到东西了,说明这个对象名,你就不能用了,你换一个名字就可以了。
任继袁 2018-01-26
  • 打赏
  • 举报
回复
引用 2 楼 liuzhijian2008x 的回复:
用版主的这个sql查就可以看到哪个对象占用了这个名字,然后处理啊。
我只是个搬运工,后续要如何处理啊
任继袁 2018-01-26
  • 打赏
  • 举报
回复
引用 1 楼 wmxcn2000 的回复:

select * from user_objects where object_name = upper('tmdetectionrecord')
查询后要如何处理啊
liu志坚 2018-01-26
  • 打赏
  • 举报
回复
用版主的这个sql查就可以看到哪个对象占用了这个名字,然后处理啊。
卖水果的net 2018-01-26
  • 打赏
  • 举报
回复

select * from user_objects where object_name = upper('tmdetectionrecord')

3,490

社区成员

发帖
与我相关
我的任务
社区描述
Oracle 高级技术相关讨论专区
社区管理员
  • 高级技术社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧