Does this way of listing array have any effect on the fun

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Does this way of listing array have any effect on the fun

Postby kytemaniac » Sat Apr 13, 2013 1:33 am

Hi,

my current code is as follow:

Code: Select all
CREATE OR REPLACE TYPE CC_RANGE_ELEM AS OBJECT
( /* TODO enter attribute and method declarations here */
       next_elem     INTEGER,
       prev_elem     INTEGER,
       range_lower  NUMBER(15),
       range_upper  NUMBER(15),
       range_bitmap NUMBER(7)
);
/

CREATE OR REPLACE TYPE CC_RANGE_LIST AS TABLE OF CC_RANGE_ELEM;
/


create or replace FUNCTION list_init(pio_list IN OUT NOCOPY CC_RANGE_LIST) RETURN INTEGER IS
.....

create or replace FUNCTION L1_Normalize_Merge(pi_ranges IN OUT NOCOPY CC_RANGE_LIST, pio_ranges IN OUT NOCOPY CC_RANGE_LIST) RETURN INTEGER IS
.......


create or replace FUNCTION L1_Check_Pay_Brand_Normalize(pi_pay_brand_iid IN NUMBER) RETURN INTEGER IS
l_include_cc_ranges        CC_RANGE_LIST := CC_RANGE_LIST();
l_out_normalized_ranges     CC_RANGE_LIST := CC_RANGE_LIST();
l_ret                       INTEGER := 0;
BEGIN

SELECT CC_RANGE_ELEM(null, null, pbr.range_lower, pbr.range_upper, null) BULK COLLECT
      INTO l_include_cc_ranges
      FROM  pay_brand pb, pay_brand_range pbr
        WHERE pbr.PAY_BRAND_IID = pi_pay_brand_iid
        AND pb.STATUS = 0
        AND pbr.RANGE_INCLUDE = 'Y'
        AND pbr.PAY_BRAND_IID = pb.PAY_BRAND_IID;       
       
   FOR i in 1.. l_include_cc_ranges.count LOOP
         prc_log_errors ('L1_Check_Pay_Brand_Normalize l_include_cc_ranges(i) ' || i);
            prc_log_errors ('L1_Check_Pay_Brand_Normalize l_include_cc_ranges(i).next_elem ' || to_char(l_include_cc_ranges(i).next_elem));
            prc_log_errors ('L1_Check_Pay_Brand_Normalize l_include_cc_ranges(i).prev_elem ' || to_char(l_include_cc_ranges(i).prev_elem));
            prc_log_errors ('L1_Check_Pay_Brand_Normalize l_include_cc_ranges(i).range_lower ' || to_char(l_include_cc_ranges(i).range_lower));
            prc_log_errors ('L1_Check_Pay_Brand_Normalize l_include_cc_ranges(i).range_uppwer ' || to_char(l_include_cc_ranges(i).range_upper));
            prc_log_errors ('L1_Check_Pay_Brand_Normalize l_include_cc_ranges(i).range_bitmap ' || to_char(l_include_cc_ranges(i).range_bitmap));
   END LOOP;
   
l_ret := list_init(l_out_normalized_ranges);

l_ret := L1_Normalize_Merge(l_include_cc_ranges, l_out_normalized_ranges);
END;
/


notice the function parameters is of in out type, so does this way of listing array have any effect on the functions
kytemaniac
Senior Member
 
Posts: 234
Joined: Tue May 19, 2009 12:59 am

Re: Does this way of listing array have any effect on the fu

Postby Tim... » Sat Apr 13, 2013 8:39 am

Hi.

I'm sorry. I don't understand the question. Are you just asking what NOCOPY does? If so, read this:

http://www.oracle-base.com/articles/mis ... -plsql.php

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog
Tim...
Site Admin
 
Posts: 17933
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK


Return to Oracle SQL and PL/SQL Development

Who is online

Users browsing this forum: No registered users and 6 guests

cron