エイリアスを介してテーブルを参照するクエリを何度もまとめていますが、次のように述べています。
*ORA-00904: "MPAN_STATUS"."MPANCORE": 無効な識別子 00904. 00000 - "%s: 無効な識別子" *原因:
アクション: 行: 43 列: 126 のエラー
クエリは次のとおりです。
SELECT readings.mpancore, mtds.meterid, (SELECT CASE
WHEN meter_type
LIKE 'RCAM%' AND
retrieval_method = 'R'
THEN 'TRUE'
ELSE 'FALSE' END
FROM edmgr.mtds
WHERE meter_removed IS NULL) "IS_SMART",
(SELECT CASE
WHEN flowversion = 'D0010' AND
readings.filename IS NOT NULL AND
readings.filedate >= mpan_status.ssd
THEN 'TRUE'
ELSE 'FALSE' END
FROM edmgr.readings, edmgr.mpan_status
WHERE readings.mpancore = mpan_status.mpancore) "D0010_RECEIVED",
(SELECT CASE
WHEN effective_from_date >= mpan_status.ssd AND
dc_id = mpan_status.confirmed_dc_id
THEN 'TRUE'
ELSE 'FALSE' END
FROM edmgr.D0019_reg, edmgr.mpan_status) "D0019_RECEIVED",
(SELECT CASE
WHEN file_date_time <= SYSDATE-409
THEN 'TRUE'
ELSE 'FALSE' END
FROM edmgr.D0019_reg) "RF_READ",
(SELECT CASE
WHEN file_date_time <= SYSDATE-220
THEN 'TRUE'
ELSE 'FALSE' END
FROM edmgr.D0019_reg) "R3_READ",
(SELECT CASE
WHEN file_date_time <= SYSDATE-118
THEN 'TRUE'
ELSE 'FALSE' END
FROM edmgr.D0019_reg) "R2_READ",
(SELECT CASE
WHEN file_date_time <= SYSDATE-56
THEN 'TRUE'
ELSE 'FALSE' END
FROM edmgr.D0019_reg) "R1_READ"
FROM edmgr.mpan_status "mpan_status" LEFT JOIN edmgr.D0019_reg "D0019" ON mpan_status.mpancore = D0019.metering_system_id
LEFT JOIN edmgr.readings "readings" ON mpan_status.mpancore = readings.mpancore
LEFT JOIN edmgr.mtds "mtds" ON readings.mpancore = mtds.mpancore
AND D0019.metering_system_id = mtds.mpancore
AND mtds.meterid = readings.meterid
私は本当に完全な初心者なので、どんな支援も大歓迎です。