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: <miaemp_at_my-deja.com>
Date: 2000/03/02
Message-ID: <89lrlf$gp2$1@nnrp1.deja.com>#1/1

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. Received on Thu Mar 02 2000 - 00:00:00 CST

Original text of this message

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