-我简化了代码,但仍然出现错误
创建材料视图C_ACT_DEA_MVIEW_mv1
记录
PCTFREE 10
迷你火车1
诺卡奇
无平行
使用索引
以SYSDATE快速刷新
按需
-带主键
如
选择
cp.ROWID AS cp_rowid,
cpp.ROWID AS cpp_rowid,
cps.ROWID AS cps_rowid,
cpsid.ROWID AS cpsid_rowid,
--MP1.ROWID AS MP1_rowid,
MP2.ROWID AS MP2_rowid,
mc.ROWID AS mc_rowid,
--mc1.ROWID作为mc1_rowid,
mst.ROWID AS mst_rowid,
--mst1.ROWID AS mst1_rowid,
MF.ROWID AS mf_rowid,
ms.ROWID AS ms_rowid,
MAS.ROWID作为MAS_rowid,
MR1.ROWID作为MR1_rowid,
VP.ROWID AS VP_rowid,
VS.ROWID AS VS_rowid,
MB.ROWID AS MB_rowid,
CA.ROWID AS CA_rowid,
--ac.ROWID AS ac_rowid,
V.ROWID AS V_rowid,
--AS“ SL.NO”,
cps.SERVICE_REQUEST_NUMBER AS“ SERVICE REQUEST NO”
FROM customer_profile cp
INNER JOIN CUSTOMER_PICKUP_POINT cpp
ON cpp.CUSTOMER_ID = cp.id
INNER JOIN CUSTOMER_PICKUP_STOPS cps
ON cpp.id = cps.CUSTOMER_PICKUP_POINT_ID
INNER JOIN CUSTOMER_PICKUP_STOPIDS cpsid
ON cps.id = cpsid.CUSTOMER_PICKUP_STOPS_ID
LEFT JOIN CUSTOMER_PICKUP_STOPIDS CPSID1
ON CPSID.PARENT_ID=CPSID1.ID
INNER JOIN MASTER_PINCODE MP
ON CPP.PICKUP_REGISTERED_PINCODE_ID=MP.ID
INNER JOIN master_city mc
ON mc.id= mp.city_id
INNER JOIN master_state mst
ON mst.ID = mc.STATE_ID
INNER JOIN MASTER_FREQUENCY MF
ON MF.ID = cps.FREQUENCY_ID
INNER JOIN master_service ms
ON ms.id = cps.SERVICE_ID
LEFT OUTER JOIN MASTER_AMOUNT_SLAB MAS
ON MAS.ID = cps.MASTER_AMOUNT_SLAB_ID
LEFT OUTER JOIN MASTER_RMSM MR1
ON MR1.ID =CP.CUSTOMER_RM_ID
LEFT OUTER JOIN MASTER_RMSM MR2
ON MR2.ID = CP.CUSOTMER_KCM_ID
INNER JOIN VENDOR_PRESENCE VP
ON VP.VENDOR_ID =cps.VENDOR_ID
AND VP.PINCODE_ID = MP.ID
INNER JOIN VENDOR_SERVICES VS
ON VP.ID = VS.VENDOR_PRESCENCE_ID
AND VS.SERVICE_ID=CPS.SERVICE_ID
LEFT JOIN MASTER_BRANCH MB
ON MB.ID = CPS.DEPOSITION_BRANCH_ID
INNER JOIN CUSTOMER_ADDRESS CA
ON CA.CUSTOMER_ID = CP.ID
INNER JOIN customer_linked_accounts acl
ON acl.id = cpsid.credit_acc_number
INNER JOIN customer_linked_accounts acl1
ON acl1.id = cpp.DEBIT_ACCOUNT_NUMBER
INNER JOIN VENDOR V
ON V.ID = CPS.VENDOR_ID
LEFT JOIN MASTER_PINCODE MP2
ON MP2.ID = CA.CUSTOMER_REGISTERED_PINCODE
LEFT JOIN MASTER_STATE MS2
ON MS2.ID = CA.CUSTOMER_REGISTERED_STATE
LEFT JOIN MASTER_CITY MC2
ON MC2.ID = CA.CUSTOMER_REGISTERED_CITY
LEFT JOIN MASTER_AMOUNT_SLAB MAS1
ON MAS1.ID = CPS.VENDOR_LIMIT;