Oracle SQL loader Use Cases

Source: Internet
Author: User
Tags sql loader

Oracle SQL loader Use Cases

Listing 1: ---------------------- dir *. csvtype abc.csv sqlplus scott/tiger @ orclcreate table emp1 (name varchar2 (80), salary number); hostnotepad abc. ctlload datainfile abc.csv into table emp fields terminated by ', 'trailing NULLCOLS (name, salary) sqlldr scott/tiger @ orcl abc. ctlexitshow userselect * from emp1; receivlisting 2: sorted set heading offset pagesize 0 spool c: \ whatever.txt select object_name | ',' | object_type from all_objectsspool offcreate table loaded asselect object_name, object_type from all_objectswhere 1 = 0; load datainfile 'C: \ whatever.txt 'into table loaded truncatewhen object_type <> 'index' fields termindated by',' (OBJECT_NAME, OBJECT_TYPE "TRIM (: object_type) ") sqlldr control = c: \ whatever. ctl log = c: \ whatever. log ----------------------------------- present by dylan.

 


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.