ORA-22813 Custom Aggregation Functions

When I execute the following script

SELECT aggr_func(bki_aggr_input(t.app_date,
                                    t.amount,
                                    t.rate, 
                                    t.term, 
                                    t.OPEN_DATE,
                                    t.STATUS_ID,
                                    t.INF_CONFIRM_DATE,
                                    t.FACT_CLOSE_DATE,
                                    t.PMT_STRING_84M,
                                    t.flag_is_own_contract,
                                    t.OUTSTANDING,
                                    t.CREDIT_LIMIT,
                                    t.TYPE_ID,
                                    t.FINAL_PMT_DATE)) p
  FROM temp_tab t 

      

where aggr_func is a user defined aggregated funciton I am getting ORA-22813 error

Function

CREATE OR REPLACE FUNCTION BKI_AGGR_CALC(input_var IN BKI_AGGR_INPUT)
  RETURN BKI_AGGR_OUTPUT
  PARALLEL_ENABLE
  AGGREGATE USING BKI_AGGR_ROUTINES;

      

and the type specification BKI_AGGR_ROUTINES

is

CREATE OR REPLACE TYPE BKI_AGGR_ROUTINES AS OBJECT
(
  acc_opn_vs_problem NUMBER,
  pat_opened_12      NUMBER,
  pat_del1p_3        NUMBER,
  max_hist_own NUMBER,
  cntOpenAccounts NUMBER,
  cntAllAccounts NUMBER, 
  ratio_open NUMBER,
  patternsArray NUMBER_TWO_DIMENSIONAL_TAB, 
  unionPattern NUMBER_TAB,
  m_nodelinq NUMBER,
  outstanding_to_credit_limit NUMBER,
  sumOutstanding NUMBER,
  sumCreditLimit NUMBER,
  paymentPatArray NUMBER_TWO_DIMENSIONAL_TAB,
  unionPaymentPat NUMBER_TAB,
  sumMonthPayOpn NUMBER, 
  load_to_avgpaym_24 NUMBER,
  reqMonthPay NUMBER, 
  sumOpenStartInCrisis NUMBER, 
  sumAllCredits NUMBER, 
  ratio_crs_not_sum NUMBER,
  ratio_m_up NUMBER,
  cnt NUMBER,
  STATIC FUNCTION ODCIAggregateInitialize(actx IN OUT BKI_AGGR_ROUTINES)
    RETURN NUMBER,
  MEMBER FUNCTION ODCIAggregateIterate(SELF     IN OUT BKI_AGGR_ROUTINES,
                                       inputVar IN BKI_AGGR_INPUT)
    RETURN NUMBER,
  MEMBER FUNCTION ODCIAggregateMerge(SELF IN OUT BKI_AGGR_ROUTINES,
                                     ctx2 IN BKI_AGGR_ROUTINES)
    RETURN NUMBER,

  MEMBER FUNCTION ODCIAggregateTerminate(SELF      IN OUT BKI_AGGR_ROUTINES,
                                         returnVar OUT BKI_AGGR_OUTPUT,
                                         flags     IN NUMBER) RETURN NUMBER
)

      

What could be causing the error? How can I investigate and fix this? Thank.

+3
oracle aggregate-functions


source to share


No one has answered this question yet

Check out similar questions:

1
SQL error ORA-01002 not autocombine and loop
1
How to quickly find exact position in pl / sql (ORA-06502: PL / SQL)
1
DBMS_MVIEW.REFRESH error causes ORA-01422 error
1
PL / SQL ORA-30625: method dispatch on NULL SELF argument is not allowed
0
"ORA-00913: too many values" when reading data from xml to user record (PL / SQL)
0
ORA-00904 when trying to use Oracle TABLE () function on UDT column passed as function parameter
0
ORA-00937 error during select subquery
0
Problem creating an Oracle User Defined String aggregation function when run through SQL Script
0
use custom aggregate functions in package
-1
Oracle ORA-01422: fine sampling returns more than requested number of rows



All Articles
Loading...
X
Show
Funny
Dev
Pics