Re: date format question for sqlldr

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Wed, 17 Dec 2003 22:27:57 -0500
Message-ID: <ub72uv8fm6dbav5mb3r7q5g426du8je2c7_at_4ax.com>


On 17 Dec 2003 13:40:32 -0800, yhkumars_at_yahoo.com (sujit) wrote:

>I would like to use a format of the form: "YYYY-MM-DD hh24:mi:ss.ssss"
>where, YYYY: 4-digit year, MM: month, DD: day, hh24: 24-hour, mi: minutes, ss:
>seconds, ssss: milli-seconds.

Are you loading into a 9i TIMESTAMP field? If so, you might try a control file entry such as:

your_field CHAR TERMINATED BY ',' ENCLOSED BY '"'

    "TO_TIMESTAMP(:your_field,'yyyy-mm-dd hh24:mi:ss.ff')",

Essentially, SQL*Loader will make TO_TIMESTAMP calls for you, to convert your character data into TIMESTAMP values.

If you're not using Oracle9i, then you have a different problem, because the DATE type available in 8i and prior release does not support fractional seconds.

Jonathan Gennick --- Brighten the corner where you are http://Gennick.com

Join the Oracle-article list and receive one article on Oracle technologies per month by email. To join, visit http://four.pairlist.net/mailman/listinfo/oracle-article, or send email to Oracle-article-request_at_gennick.com and include the word "subscribe" in either the subject or body. Received on Thu Dec 18 2003 - 04:27:57 CET

Original text of this message