Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
SQL*Loader Date error (ORA-01858)

SQL*Loader Date error (ORA-01858)

2005-12-08       - By Hostetter, Jay M

Reply:     1     2     3     4     5  

Madhavi,

 I wonder if sql*loader is having trouble with the column name
TIMESTAMP?  Could you test it with a different column name?
 Also, if the datatype of the TIMESTAMP column is TIMESTAMP, then you
should try TO_TIMESTAMP instead of TO_DATE.  The implicit conversion
could be an issue.

Jay

__ ____ ____ ____ ____ ____ ____

From: oracle-l-bounce@(protected)
[mailto:oracle-l-bounce@(protected)] On Behalf Of Jim Silverman
Sent: Wednesday, December 07, 2005 3:32 PM
To: oracle-l@(protected)
Subject: RE: SQL*Loader Date error (ORA-01858 (See ORA-01858.ora-code.com))



This may be a silly question, but are you sure that the column names in
the controlfile correspond properly to the columns in your table
RE_STATS_STAGING?  In particular, are you sure that the datatypes of the
input data (including the timestamp constant) are compatible with the
datatypes in the table definition?

=====================================
Jim Silverman
Senior Systems Database Administrator
Solucient, LLC
Telephone:   734-669-7641
FAX:            734-930-7611
E-Mail:         jsilverman@(protected)

    From: oracle-l-bounce@(protected)
[mailto:oracle-l-bounce@(protected)] On Behalf Of Madhavi Kanugo
    Sent: Wednesday, December 07, 2005 1:20 PM
    To: 'oracle-l@(protected)'
    Subject: SQL*Loader Date error (ORA-01858 (See ORA-01858.ora-code.com))

    Hello  All,

    I'm trying to load data using SQL Loader and ran into
the ORA-01858 (See ORA-01858.ora-code.com): a non-numeric character was found where a numeric was
expected  error.

    Below is my control file. As you can see, the timestamp
is a constant field and I am loading its value from the filename of the
data files. I am executing the sql loader from a shell script and
creating the control file on the fly. The filename is in the form of:
20051206130101.txt  So basically, the shell script replaces the
when_changed value with 20051206130101.

    I created a temp table with just a date field and tried
to insert a value into it. Insert into temp values
(to_date('20051207160752','YYYYMMDDHH24MISS')); and there is no error
and date conversion is implict.

    But SQLLOADER is erring out on ORA-01858 (See ORA-01858.ora-code.com).

    LOAD DATA

    INFILE FILENAME

    APPEND

    INTO TABLE RE_STATS_STAGING

    FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'

       TRAILING NULLCOLS

    (

     RE_NAME,

     TG_TYPE,

     TRUNKGROUP,

     CONNECTS,

     HANGUPS,

     DECLINES,

               LOOPS,

               SECONDS,

               CC_CONNECTED,

               CC_SETUP,

               TIMESTAMP CONSTANT
"to_date('_when_changed_','YYYYMMDDHH24MISS')"

           )

    Any ideas on where I am going wrong? Any thoughts or
help will be appreciated.


    Thanks in advance,

    Madhavi




**DISCLAIMER
This e-mail message and any files transmitted with it are intended for the use
of the individual or entity to which they are addressed and may contain
information that is privileged, proprietary and confidential. If you are not
the intended recipient, you may not use, copy or disclose to anyone the message
or any information contained in the message. If you have received this
communication in error, please notify the sender and delete this e-mail message
. The contents do not represent the opinion of D&E except to the extent that it
relates to their official business.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>RE: SQL*Loader Date error (ORA-01858 (See ORA-01858.ora-code.com))</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1522" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN lang=en-us><FONT face=Arial><FONT
size=2>Madhavi<SPAN class=266053613-08122005>,</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN lang=en-us><FONT face=Arial><FONT size=2><SPAN
class=266053613-08122005></SPAN></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN lang=en-us><FONT face=Arial><FONT size=2><SPAN
class=266053613-08122005>&nbsp; I wonder if sql*loader is having trouble with
the column name TIMESTAMP?&nbsp; Could you test it with a different column
name?</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN lang=en-us><FONT face=Arial><FONT size=2><SPAN
class=266053613-08122005>&nbsp; Also, if the datatype of the TIMESTAMP column
is
TIMESTAMP, then you should try TO_TIMESTAMP instead of TO_DATE.&nbsp; The
implicit conversion could be an issue.</SPAN></FONT></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN lang=en-us><FONT face=Arial><FONT size=2><SPAN
class=266053613-08122005></SPAN></FONT></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN lang=en-us><FONT face=Arial><FONT size=2><SPAN
class=266053613-08122005>Jay</SPAN></FONT></FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> oracle-l-bounce@(protected)
[mailto:oracle-l-bounce@(protected)] <B>On Behalf Of </B>Jim
Silverman<BR><B>Sent:</B> Wednesday, December 07, 2005 3:32 PM<BR><B>To:</B>
oracle-l@(protected)<BR><B>Subject:</B> RE: SQL*Loader Date error
(ORA-01858 (See ORA-01858.ora-code.com))<BR></FONT><BR></DIV>
<DIV></DIV><!-- Converted from text/rtf format -->
<P align=left><SPAN lang=en-us><FONT face=Arial color=#000080 size=2>This may
be
a silly question, but are you sure that the column names in the controlfile
correspond properly to the columns in your table</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us> <FONT face=Arial color=#000080
size=2>RE_STATS_STAGING?&nbsp;</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us> <FONT face=Arial color=#000080 size=2>In particular, are you sure
that the datatypes of the input data (including the timestamp constant) are
compatible with the datatypes in the table definition?</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT face=Arial color=#000080
size=2></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> </SPAN></P>
<P align=left><SPAN lang=en-us></SPAN><A name=""><SPAN lang=en-us><FONT
face="Comic Sans MS" color=#ff0000
size=2>=====================================</FONT></SPAN></A><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT color=#000080><BR></FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face="Comic Sans MS" color=#ff0000 size=2>Jim Silverman</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT color=#000080><BR></FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face="Comic Sans MS" color=#ff0000 size=2>Senior Systems Database
Administrator</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
color=#000080><BR></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT face="Comic Sans MS" color=#ff0000
size=2>Solucient, LLC</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us><FONT color=#000080><BR></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT face="Comic Sans MS" color=#ff0000
size=2>Telephone:&nbsp;&nbsp; 734-669-7641</FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT color=#000080><BR></FONT></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
face="Comic Sans MS" color=#ff0000
size=2>FAX:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
734-930-7611</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
color=#000080><BR></FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us></SPAN><SPAN lang=en-us><FONT face="Comic Sans MS" color=#ff0000
size=2>E-Mail:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
jsilverman@(protected)</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
lang=en-us><FONT color=#000080></FONT></SPAN><SPAN lang=en-us> </SPAN></P>
<UL>
 <UL>
   <P align=left><SPAN lang=en-us><B><FONT face=Tahoma
   size=2>From:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us>
<FONT
   face=Tahoma size=2> oracle-l-bounce@(protected) [<A
   href="mailto:oracle-l-bounce@(protected)">mailto:oracle-l-bounce
@(protected)</A>]</FONT></SPAN><SPAN
   lang=en-us><B></B></SPAN><SPAN lang=en-us><B> <FONT face=Tahoma size=2>On
   Behalf Of</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us> <FONT
   face=Tahoma size=2>Madhavi Kanugo<BR></FONT></SPAN><SPAN
   lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
   size=2>Sent:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us>
<FONT
   face=Tahoma size=2> Wednesday, December 07, 2005 1:20
   PM<BR></FONT></SPAN><SPAN lang=en-us><B></B></SPAN><SPAN lang=en-us><B>
<FONT
   face=Tahoma size=2>To:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN
   lang=en-us><FONT face=Tahoma size=2>
   'oracle-l@(protected)'<BR></FONT></SPAN><SPAN
   lang=en-us><B></B></SPAN><SPAN lang=en-us><B><FONT face=Tahoma
   size=2>Subject:</FONT></B></SPAN><SPAN lang=en-us></SPAN><SPAN
   lang=en-us><FONT face=Tahoma size=2> SQL*Loader Date error
   (ORA-01858 (See ORA-01858.ora-code.com))</FONT></SPAN><SPAN lang=en-us></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>Hello
   &nbsp;All,</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>I'm trying to load
   data using SQL Loader and ran into the ORA-01858 (See ORA-01858.ora-code.com):</FONT></SPAN><SPAN
   lang=en-us> a non-numeric character was found where a numeric was expected
   &nbsp;</SPAN><SPAN lang=en-us><FONT face=Arial
   size=2>error.</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>Below is my control
   file. As you can see, the timestamp is a constant field and I am loading
its
   value from the filename of the data files. I am executing the sql loader
   from a shell script and creating the control file on the fly. The filename
   is in the form of: 20051206130101.txt &nbsp;So basically, the shell script
   replaces the when_changed value with 20051206130101.</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>I created a temp
   table with just a date field and tried to insert a value into it. Insert
   into temp values (</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
   lang=en-us><FONT face=Courier color=#000000
   size=2>to_date</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN lang=en-us><FONT
   face=Courier color=#0000f0 size=2>(</FONT></SPAN><SPAN
   lang=en-us></SPAN><SPAN lang=en-us><FONT face=Courier color=#ff0000
   size=2>'20051207160752'</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
   lang=en-us><FONT face=Courier color=#0000f0 size=2>,</FONT></SPAN><SPAN
   lang=en-us></SPAN><SPAN lang=en-us><FONT face=Courier color=#ff0000
   size=2>'YYYYMMDDHH24MISS'</FONT></SPAN><SPAN lang=en-us></SPAN><SPAN
   lang=en-us><FONT face=Courier color=#0000f0 size=2>)); and there is no
error
   and date conversion is implict.</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Courier color=#0000f0 size=2>But
   SQLLOADER is erring out on ORA-01858 (See ORA-01858.ora-code.com).</FONT></SPAN><SPAN
   lang=en-us></SPAN><SPAN lang=en-us> </SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>LOAD DATA
   </FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>INFILE FILENAME
   </FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>APPEND
   </FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>INTO TABLE
   RE_STATS_STAGING</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>FIELDS TERMINATED BY
   ',' OPTIONALLY ENCLOSED BY '"' </FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;
   TRAILING NULLCOLS </FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>( </FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>&nbsp;
   RE_NAME,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>&nbsp;
   TG_TYPE,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>&nbsp;
   TRUNKGROUP,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>&nbsp;
   CONNECTS,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>&nbsp;
   HANGUPS,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>&nbsp;
   DECLINES,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial
   size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   LOOPS,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial
   size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   SECONDS,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial
   size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   CC_CONNECTED,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial
   size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   CC_SETUP,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial
   size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   TIMESTAMP CONSTANT
   "to_date('_when_changed_','YYYYMMDDHH24MISS')"</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial
   size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>Any ideas on where I
   am going wrong? Any thoughts or help will be
   appreciated.</FONT></SPAN></P><BR>
   <P align=left><SPAN lang=en-us><FONT face=Arial size=2>Thanks in
   advance,</FONT></SPAN></P>
   <P align=left><SPAN lang=en-us><FONT face=Arial
   size=2>Madhavi</FONT></SPAN></P><BR></UL></UL><br><br><table bgcolor=white
style="color:black"><tr><td><br><br>
<br>
**DISCLAIMER<br>
This&nbsp;e-mail&nbsp;message&nbsp;and&nbsp;any&nbsp;files&nbsp;transmitted
&nbsp;with&nbsp;it&nbsp;are&nbsp;intended&nbsp;for&nbsp;the&nbsp;use&nbsp;of
&nbsp;the&nbsp;individual&nbsp;or&nbsp;entity&nbsp;to&nbsp;which&nbsp;they&nbsp
;are&nbsp;addressed&nbsp;and&nbsp;may&nbsp;contain&nbsp;information&nbsp;that
&nbsp;is&nbsp;privileged,&nbsp;proprietary&nbsp;and&nbsp;confidential.&nbsp;If
&nbsp;you&nbsp;are&nbsp;not&nbsp;the&nbsp;intended&nbsp;recipient,&nbsp;you&nbsp
;may&nbsp;not&nbsp;use,&nbsp;copy&nbsp;or&nbsp;disclose&nbsp;to&nbsp;anyone&nbsp
;the&nbsp;message&nbsp;or&nbsp;any&nbsp;information&nbsp;contained&nbsp;in&nbsp
;the&nbsp;message.&nbsp;If&nbsp;you&nbsp;have&nbsp;received&nbsp;this&nbsp
;communication&nbsp;in&nbsp;error,&nbsp;please&nbsp;notify&nbsp;the&nbsp;sender
&nbsp;and&nbsp;delete&nbsp;this&nbsp;e-mail&nbsp;message.&nbsp;The&nbsp;contents
&nbsp;do&nbsp;not&nbsp;represent&nbsp;the&nbsp;opinion&nbsp;of&nbsp;D&amp;E&nbsp
;except&nbsp;to&nbsp;the&nbsp;extent&nbsp;that&nbsp;it&nbsp;relates&nbsp;to&nbsp
;their&nbsp;official&nbsp;business.</td></tr></table></BODY></HTML>