查询的问题

SELECT OID asoid,

ACCIDENT_NAME asaccidentName,

ACCIDENT_TIME as accidentTime,

ACCIDENT_TYPE as accidentType,

DEATHS as deaths,

MINOR_INJURIES as minorInjuries,

DIRCT_FINANCIAL_LOSS as dirctFinancialLoss,

PROCESSING_RESULTS as processingResults,

(select Dept_Name from SYS_ORGANIZATIONAL a

where to_char(a.OID) =UNITNAME) AS unitName,

(select Dept_Name from SYS_ORGANIZATIONAL a

whereto_char(a.OID)=ACCIDENT_REPORT_UNIT) AS accidentReportUnit,

(select EMPLOYEE_NAME from SYS_EMPLOYEE a

where to_char(a.OID) =CREATETOR) AS creator

fromPMI_SAFE_ACCIDENT

一直不能运行成功,找到原因:oid设置成char类型

猜你喜欢

转载自timewind.iteye.com/blog/2154308