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;
uj5u.com熱心網友回復:
select * from user_objects where object_name = upper('tmdetectionrecord')
uj5u.com熱心網友回復:
用版主的這個sql查就可以看到哪個物件占用了這個名字,然后處理啊。uj5u.com熱心網友回復:
查詢后要如何處理啊
uj5u.com熱心網友回復:
我只是個搬運工,后續要如何處理啊
uj5u.com熱心網友回復:
如果查到東西了,說明這個物件名,你就不能用了,你換一個名字就可以了。
uj5u.com熱心網友回復:
資料庫中有一個其他型別的物件名稱和你這個視圖的名稱沖突了,把問題反饋給寫代碼的人來解決,你不用處理,也不能隨意修改名字,否則應用程式可能會有問題。uj5u.com熱心網友回復:
把問題反饋給資料庫管理的人,到底改那個由他來確定。你自己改了 可能程式會報錯轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/73319.html
標籤:高級技術
