RE: SQL*Loader Date error (ORA-01858 (See ORA-01858.ora-code.com))If you check it out, the timestamp is not even a date field. It is its own type of data.
Ruth -- --Original Message-- -- From: oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)]On Behalf Of Hostetter, Jay M Sent: Thursday, December 08, 2005 8:45 AM To: oracle-l@(protected) Subject: RE: SQL*Loader Date error (ORA-01858 (See ORA-01858.ora-code.com))
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.
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><SPAN class=401340920-08122005><FONT face=Arial size=2>If you check it out , the timestamp is not even a date field. It is its own type of data. </FONT></SPAN></DIV> <DIV><SPAN class=401340920-08122005><FONT face=Arial size=2></FONT></SPAN> </DIV> <DIV><SPAN class=401340920-08122005><FONT face=Arial size=2>Ruth</FONT></SPAN></DIV> <DIV class=OutlookMessageHeader><FONT face="Times New Roman" size=2>-- --Original Message-- --<BR><B>From:</B> oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)]<B>On Behalf Of</B> Hostetter, Jay M<BR><B>Sent:</B> Thursday, December 08, 2005 8:45 AM<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><BR></FONT></DIV> <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> </DIV> <DIV dir=ltr align=left><SPAN lang=en-us><FONT face=Arial><FONT size=2><SPAN class=266053613-08122005> I wonder if sql*loader is having trouble with the column name TIMESTAMP? 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> 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.</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> </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? </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: 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: 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: 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 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 </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 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> 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> RE_NAME,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> TG_TYPE,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> TRUNKGROUP,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> CONNECTS,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> HANGUPS,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> DECLINES,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> LOOPS,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> SECONDS,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> CC_CONNECTED,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> CC_SETUP,</FONT></SPAN></P> <P align=left><SPAN lang=en-us><FONT face=Arial size=2> TIMESTAMP CONSTANT "to_date('_when_changed_','YYYYMMDDHH24MISS')"</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>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 style="COLOR: black" bgColor=white> <TBODY> <TR> <TD><BR><BR><BR>**DISCLAIMER<BR>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.</TD>< /TR></TBODY></TABLE></BODY></HTML>