Oracle bulk collect Batch Data Acquisition improves efficiency

Source: Internet
Author: User


Oracle bulk collect Batch Data fetch efficiency SQL code www.2cto.com -- Created on 2010/11/04 by WANGNAN declare -- Local variables here I integer; TYPE t_table IS TABLE OF VARCHAR2 (10) index by VARCHAR2 (2); v_t_table t_table; TYPE t_pg3 is table of asis. PG3_AGENTCD_CONVERSION % ROWTYPE; v_pg3_table t_pg3; c_pg3_vendor com. cRef; v_str VARCHAR2 (250); begin -- Test statements here OPEN c_pg3_vendor for select * FROM asis. PG3_AGENTCD_CONVERSION; FETCH c_pg3_vendor bulk collect into v_pg3_table; FOR I IN 1 .. v_pg3_table.count LOOP v_t_table (v_pg3_table (I ). ASIS_AGENT_CD): = v_pg3_table (I ). TOBE_VENDOR_CD; end loop; v_str: = v_t_table.first; WHILE v_str is not null loop values (v_str | ':' | v_t_table (v_str); v_str: = v_t_table.next (v_str ); end loop; exception when others then dbms_output.put_line (sqlerrm); END;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.