Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: SQL Loader and Date Conversions?

Re: SQL Loader and Date Conversions?

From: <liam_2e_at_my-deja.com>
Date: 2000/03/02
Message-ID: <89lvq1$jsb$1@nnrp1.deja.com>#1/1

here is the actual control file that I am using I goofed up and didn't post it before.

load data
infile 'd:\dataload\DAILY_SALES.out'
into table daily_sales
(amount_ordered position (1:2) char,
purchase_date position (11:21) date 'mmm dd yyyy', product_id position (29:40) char,
act_type position (51) char)

and it seems to work but now I get the error message

Commit point reached - logical record count 1057

and then when i go to sql plus and look in the table no data was loaded! I tried using rows=100 in my command line ex: sqlldr user/pass rows-100 to see if this would commit after 100 rows but it gives me the same error message it just says 100. Thanks for all the help
Liam

In article <89lrlf$gp2$1_at_nnrp1.deja.com>,   miaemp_at_my-deja.com wrote:
> What you need to do is specify the format of the date field in the
> control file. After defining the field name and the datatype and
> before the comma for the next field, put the following:
> "mmm dd yyyy 24hh:mm:ss"
> You may need to remove the 24.
>
> HTH
> Eric Peterson, DBA
>
> The views I have expressed are solely my own and not that of my
> company's
>
> In article <89k97d$ech$1_at_nnrp1.deja.com>,
> liam_2e_at_my-deja.com wrote:
> > Hello everyone,
> >
> > I am currently trying to load a dat file in to oracle that has a
> > multiple date field in it here is a piece of it.
> >
> > 1 apr 01 1998 00:00:000210371658 1
> > 1 apr 01 1998 00:00:000646658333 5
> > 1 apr 01 1998 00:00:001074546000 4
> >
> > I have seen lots of code examples that show how to dates that don't
> > have any spaces in between, but nothing that like my dat above.
 Below
> > is the table that I created to take the dat.
> >
> > SQL> create table daily_sales (
> > 2 amount_ordered char(2),
> > 3 purchase_date date ,
> > 4 product_id char(12),
> > 5 act_type char(1));
> >
> > Table created.
> >
> > Then I went and created the control file shown below.
> >
> > SQL> create table daily_sales (
> > 2 amount_ordered char(2),
> > 3 purchase_date date,
> > 4 product_id char(12),
> > 5 act_type char(1));
> >
> > Table created.
> >
> > When i try to run the load I get the error message.
> >
> > SQL*Loader-350: Syntax error at line 5.
> > Expecting valid column specification, "," or ")", found "postion".
> > purchase_date postion (11:21) date 'mmm dd yyyy',
> >
> > Thanks for the help
> >
> > Liam
> >
> > Sent via Deja.com http://www.deja.com/
> > Before you buy.
> >
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Mar 02 2000 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US