Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL Loader Control file
starigopula wrote:
> Hi,
>
> Is there a way we can specify multiple delimiter in the FIELDS
> TERMINATED BY Clause?
>
> Here is a sample control file..... The data to load may be delimieted
> either with a | or , or ?
>
> Thanks in advance.........
>
> CTL File
>
> -----------
>
> LOAD DATA
>
> INFILE 'datafile.dat'
>
> INTO TABLE test_table_name
>
> APPEND
>
> FIELDS TERMINATED BY ','
>
> (
>
> COL1 INTEGER EXTERNAL,
>
> COL2 INTEGER EXTERNAL,
>
> COL3 ...
>
> --
> Posted via http://dbforums.com
Do you mean something like this?
LOAD DATA
INFILE *
APPEND
INTO TABLE emp
FIELDS TERMINATED BY ","
OPTIONALLY ENCLOSED BY '"'
(empno, ename, job, mgr, hiredate DATE "DD-Month-YYYY",
sal, comm, deptno CHAR TERMINATED BY ':',
projno, loadseq SEQUENCE(MAX,1))
BEGINDATA
9782,"Clark",Manager",7839, 09-June-2000, 2572.50,, 10:101
9839,"King","President", , 17-November-1999, 5500.00,,10:102
-- Daniel Morgan http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp http://www.outreach.washington.edu/extinfo/certprog/aoa/aoa_main.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Thu Aug 28 2003 - 18:51:22 CDT