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;