09 ORA系列:ORA-06553 PLS-306

如果希望对常见的Oracle异常ORA报错解决方案有系统的了解,请看《ORACLE系列异常总结ORA》。

 

ORA-06553: PLS-306: wrong number or types of arguments in call to 'OGC_AREA'

调用area时,错误数值或者参数类型错误

OGC_AREA表示:在调用参数area时,报错

09 ORA系列:ORA-06553 PLS-306_第1张图片

 

执行如下SQL时报错:

09 ORA系列:ORA-06553 PLS-306_第2张图片

select

t.fid,

t.ftransactionstatus,

t.fsettleaccountstatus,

area.fname

from t_trade_transactionreport t

where t.fid = 'JY170830000008'

 

异常原因是:SQL中,没有area这个参数。

09 ORA系列:ORA-06553 PLS-306_第3张图片

 

当然上面的SQL能一下子发现问题,如果是如下非常复杂的SQL就比较难发现了。

select report.fid "id"

,

report.fuuId "uuId",

report.frate "rate",

report.fcompensable "compensate.compensable",

report.fdisabledInfo "compensate.disabledInfo",

report.frateInfo "rateInfo",

report.fauditState "auditState",

report.fadjustStatus "adjustStatus",

report.fintentionDate "intentionDate",

report.ftransactionStatus "transactionStatus",

report.ftransferstatus "transferStatus",

report.freturnvisit "returnVisit",

report.fsettleaccountstatus "settleAccountStatus",

report.foncommission "onCommission",

report.ftransactiondate "transactionDate",

report.ftotalprice "totalPrice",

report.fcustomermoney "customerMoney",

report.fcustomercommission "customerCommission",

report.fownercommission "ownerCommission",

report.fcommissioncost "commissionCost",

report.finstallmentcosttype "installmentCostType",

report.finstallmentcost "installmentCost",

report.fsalestatus "saleStatus",

report.fhouseStatus "houseStatus",

report.fcollaboratecost "collaborateCost",

report.fcollaboratename "collaborateName",

report.fcardnumber "cardNumber",

report.fphone "phone",

report.fsurpluscommission "surplusCommission",

report.fownercost "ownerCost",

report.fcustomercost "customerCost",

report.fremark "remark",

report.ftenementdetail "tenementDetail",

report.fpaycosttype "payCostType",

report.fcommitdate "commitDate",

report.fcustomerpaytype "customerPayType",

report.fauditdate "auditDate",

report.fkownercostid "ownerCostId",

report.fkcustomercostid "customerCostId",

report.fmortgagedetail "mortgageDetail",

report.fcollaboratetype "collaborateType",

report.fincomepaystatus "incomePayStatus",

report.fcontractexplain "contractExplain",

report.fcommissiondiscount "commissionDiscount",

report.fpublichouse "publicHouse",

report.fremarktenement "remarkTenement",

report.fpiece "piece",

report.fadjustAmount "adjustAmount",

report.fcontractStatus "contractStatus",

report.freceiveCommissionDiscount "receiveCommissionDiscount",

report.fflowNum "flowNum",

report.factualReceiptCommission "actualReceiptCommission",

report.fhouseHoldStatus "houseHoldStatus",

report.fnewHouseReportId "newHouseReportId",

report.fnewHouseReportNumber "newHouseReportNumber",

report.facceptStatus "acceptStatus",

report.fpropertyType "propertyType",

report.fperformanceDate "performanceDate",

report.fnewperformanceDate "newPerformanceDate",

report.fareaName "areaName",

report.ftenementAddress "tenementAddress",

report.fcreatetime "createTime",

report.flastupdatetime "lastUpdateTime",

report.fenable "enable",

report.fkcreatebyid "createBy.id",

report.fklastupdatebyid "lastUpdateBy.id",

report.fkcuid "cu.id",

report.fkhouseid "house.id",

report.fownername "house.ownerName",

report.fgardenname "house.gardenName",

report.fkgardenid "house.garden.id",

report.fkcustomerid "tradeCustomer.customerId",

report.fcustomername "tradeCustomer.name",

report.fcustomername "customer.name",

report.fkpersonid "person.id",

person.fname "person.name",

report.fkthreecommadorgid "threeCommadOrg.id",

report.fsettlementBodyName "settlementBodyName",

report.ffinanceSubmitdate "financeSubmitDate",

report.fkfinanceSubmitPersonid "financeSubmitPerson.id",

financeSubmitPerson.fname "financeSubmitPerson.name",

report.fkcommadorgid "commadOrg.id",

report.fbelongBorderReport "belongBorderReport",

report.fbelongPrimary "belongPrimary",

report.fdisabled "disabled",

commadOrg.fname "commadOrg.name",

commadOrg.flongNumber "commadOrg.longNumber",

report.fktransferid "transfer.id",

report.fkmortgagePersonid "mortgagePerson.id",

report.fnetSignedNo "netSignedNo",

report.fkorgid "org.id",

org.fname "org.name",

org.fdisplayName "org.displayName",

followPerson.fid "followPerson.id",

followPerson.fname "followPerson.name",

signPerson.fid "signPerson.id",

signPerson.fname "signPerson.name",

report.fsurpluscommission "receivable"

,

house.fregionname "tradeHouseInfo.regionName",

area.fgardenaddress "tradeHouseInfo.gardenAddress"

 

from t_trade_transactionreport report

inner join t_hr_org commadOrg

on report.fkcommadorgid = commadOrg.fid

inner join t_hr_org org

on report.fkorgid = org.fid

left join t_hr_person person

on report.fkpersonId = person.fid

left join t_hr_person followPerson

on report.fkfollowpersonid = followPerson.fid

left join t_hr_person signPerson

on report.fksignpersonid = signPerson.fid

left join t_hr_person financeSubmitPerson

on report.fkfinanceSubmitPersonid = financeSubmitPerson.fid

left join t_trade_TransferSeek seek

on seek.FKTRANSACTIONREPORTID = report.fid

 

inner join t_trade_tradehouse house

on house.fid = report.fkhouseid

 

where 1 = 1

and report.fenable = 'YES'

-- and report.fsaleStatus in(

-- 'SALE','GANGED_SALE_COMMISSION'

-- )

and house.fkregionid = 'RjmhRn/nQqGQS6+L+YwgxLqHDS8='

and report.ftransactionStatus = 'TURNOVER_UNTREATED'

 

order by decode(report.ftransactionStatus, 'TURNOVER_UNTREATED', 1, 0) desc,

report.fintentionDate desc

 

 

 

 

 

 

你可能感兴趣的:(Oracle,ORACLE)