10 joins works fine but more than tha gives error

10 joins works fine but more than tha gives error

Post by Selami Ozl » Thu, 29 Nov 2007 03:04:07


AM GETTING THE FOLLOWIN ERROR MESSAGE:
"ORA-01445 cannot select from ROWID"



my query :


SELECT
-- L/C Application Information
SUBSTR(C00_CUST_DDA_ACCT,3,3) Branch
,SUBSTR(C00_CUST_DDA_ACCT,6,6) Customer_No
,SUBSTR(C00_CUST_DDA_ACCT,12,2) Currency
,CASE WHEN C00_LC_TYPE='I' THEN '4' WHEN C00_LC_TYPE='E' THEN '5'
ELSE ' ' END ACCNT_Type
,SUBSTR(C00_USER_XREFN,13,3) Serial_NO
-- L/C Status NOT COMPLETE
--,CASE WHEN LNI_TRN_NO_NUM IS NULL THEN '4' WHEN
LNI_TRN_NO_NUM<>'' THEN '5' ELSE '' END LC_Status
,(SELECT MAX(TO_NUMBER(C01_TYPE_SEQ)) FROM LOLOC01 WHERE
LOLOC01.C01_GROUP = LOLOC00.C00_GROUP AND
LOLOC01.C01_NUMBER=LOLOC00.C00_NUMBER) Number_Of_Amd_Times
,CASE WHEN C00_LC_TYPE='I' THEN '1' WHEN C00_LC_TYPE='E' THEN '2'
ELSE ' ' END LC_Type
,C00_ISSUE_DATE + 19000000 Year
,'723' GL_NO
,SUBSTR(C00_USER_XREFN,13,3) Incmoning_Doc_NO
,C00_REVOCABLE_IND Revocation_Code
,C50_CONF_INSTR_OR Confirmation_Code
,CASE WHEN C00_STAND_BY_IND = 'Y' THEN '2' ELSE '1' END
Transfer_Code
,C00_REVOLVE_TYPE Revolving_Type
,C50_AVAIL_BY Method_of_Payment
,C00_TENORCODE_LATE Delivery_Terms_Code
,CASE WHEN C00_ABOUT_MODIFER='Y' THEN 10 ELSE 0 END
About_Percentage
,CASE WHEN C00_ABOUT_MODIFER <>'Y' THEN C00_PCT_MODIFER ELSE 0 END
Percentage_of_Tolerance_AMT
,C00_CASHCL_BASE_BL LC_Sight_AMT
,C00_CASHCL_ORIGAMT LC_Deferred_AMT
,C00_BOOK_EXCH_RATE Central_Bank_Rate
,C00_CONF_OPEN_AMT LC_Sight_Equivalent_AMT
,C00_UNCNF_OPEN_AMT LC_Deferred_Equivalent_AMT
,C00_CONF_ORIG_PCT Sight_Margin_Percentage
,C00_CASH_COLL_PCT Deferred_Margin_Percentage
,C00_CASHCL_DB_DDA Customer_Margin_Account
,C00_CASH_COLL_CURR Cash_Margin_Currency
,C00_CASHCL_ORIGAMT Sight_Margin_AMT
,C00_CASHCL_ORIG_BS Sight_Margin_Eqi_AMT
,C00_CASH_COLL_BAL Deferred_Margin_AMT
,C00_CASHCL_BASE_BL Deferred_Margin_Eqi_AMT
,C00_COMM_DB_DDA Customer_Acc_NO_for_Changes
,C00_COMM_PERD_TYPE Iss_Comm_Type
,C05_COMM_RT_OVRD Iss_Comm_Percentage
,C05_ACCEPT_EXCH_RT Draft_Comm_Percentage
,C01_ACCT_EXCH_RATE Exchange_Comm_Percentage
,C02_INTEREST_RATE Interest_Percentage
,C05_STD_COMM_AMT Comm_AMT
,C05_ACCEPT_BAL Draft_Comm_AMT
,C00_CABL_CHGS_AMT Telex_AMT
,CASE WHEN EXISTS(SELECT DP3_REF_NUMBER FROM LDFPY03 WHERE
DP3_REF_NUMBER=C00_GROUP || C00_NUMBER AND DP3_APPL_TYPE='LN' AND
(DP3_CHRG_MNEM_CD_1='?' OR DP3_CHRG_MNEM_CD_2='?' OR
DP3_CHRG_MNEM_CD_3='?' OR DP3_CHRG_MNEM_CD_4='?')) THEN
TRIM(TO_CHAR((SELECT SUM(CASE WHEN DP3_CHRG_MNEM_CD_1='?'
THEN DP3_CHRG_AMT_1
WHEN DP3_CHRG_MNEM_CD_2='?'
THEN DP3_CHRG_AMT_2
WHEN DP3_CHRG_MNEM_CD_3='?'
THEN DP3_CHRG_AMT_3
WHEN DP3_CHRG_MNEM_CD_4='?'
THEN DP3_CHRG_AMT_4
ELSE 0 END)
FROM LDFPY03 WHERE DP3_REF_NUMBER=C00_GROUP ||
C00_NUMBER AND DP3_APPL_TYPE='LN'),'99999999990.000'))
ELSE ' ' END Stamp_AMT
,C05_COMM_AMT Exc_Comm_AMT
,XL5_AP_ACC_INT_RAT Interest_AMT
,C00_ISSUE_DATE + 19000000 Date_of_Iss
,C00_EXPR_DATE_ORIG + 19000000 Date_of_Expiry
,C00_SHIP_FROM Shipping_Port
,C00_SHIP_TO Destination_Port
,C00_SHPNG_DATELATE + 19000000 Latest_Date_of_Shipment
,C00_EXPR_AT_CITY Place_of_LC_Expiry
,CASE WHEN C00_PART_SHIPT_IND='Y' THEN 1 ELSE 2 E