Oracle View creation, cursors, left join

Source: Internet
Author: User

Creation of the View:

Create or Replace View  as Select csib. * , Sib. Stock_io_,sib. Confirm_date_ from dm_mat_contract_stock_in_bill csibleftouter  Joinon= sib. Bill_code_;

Oracle cursors using: http://www.cnblogs.com/sc-xx/archive/2011/12/03/2275084.html

an explicit cursor :

An implicit cursor:

When a table is connected, there is a primary table left OUTER join table effect is generally better than the direct inner connection

Internal connections using Java code instead: Yes, splicing fields:

 for(Map<string, object>matcontractstockbill:matcontractstockbilllist) {String Billcode= (String) matcontractstockbill.get ("Bill_code_"); List<map<string, object>> matcontractstocklist = Matcontractstockservice.selectmatcontractstock (BillCode,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL, 1,-1, operator); String Bill_context_= "";  for(Map<string, object>matcontractstock:matcontractstocklist) {String Billcontext= Matcontractstock.get ("mat_desc_") + "(" + matcontractstock.get ("Amount_") + ")"; Bill_context_+ = Billcontext + ","; } matcontractstockbill.put ("Bill_context_", Bill_context_); }

Oracle View creation, cursors, left join

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.