.ora-code.com

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-07       - By Madhavi Kanugo
Reply:     1     2     3     4     5  

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






<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft
-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http:
//www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
/* Font Definitions */
@(protected)
  {font-family:Courier;
  panose-1:2 7 4 9 2 2 5 2 4 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
  {margin:0in;
  margin-bottom:.0001pt;
  font-size:12.0pt;
  font-family:"Times New Roman";}
a:link, span.MsoHyperlink
  {color:blue;
  text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
  {color:purple;
  text-decoration:underline;}
span.EmailStyle17
  {mso-style-type:personal-compose;
  font-family:Arial;
  color:windowtext;}
@(protected) Section1
  {size:8.5in 11.0in;
  margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
  {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
 <o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hello &nbsp;All,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I'm trying to load data using SQL Loader and ran into
the ORA-01858 (See ORA-01858.ora-code.com): </span></font>a non-numeric character was found where a numeric
was expected &nbsp;<font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>error.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>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
.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I created a temp table with just a date field and tried to
insert a value into it. Insert into temp values (</span></font><font size=2
color=black face=Courier><span style='font-size:10.0pt;font-family:Courier;
color:black'>to_date</span></font><font size=2 color="#0000f0" face=Courier>
<span
style='font-size:10.0pt;font-family:Courier;color:#0000F0'>(</span></font><font
size=2 color=red face=Courier><span style='font-size:10.0pt;font-family:Courier;
color:red'>'20051207160752'</span></font><font size=2 color="#0000f0"
face=Courier><span style='font-size:10.0pt;font-family:Courier;color:#0000F0'>,
</span></font><font
size=2 color=red face=Courier><span style='font-size:10.0pt;font-family:Courier;
color:red'>'YYYYMMDDHH24MISS'</span></font><font size=2 color="#0000f0"
face=Courier><span style='font-size:10.0pt;font-family:Courier;color:#0000F0'>)
);
and there is no error and date conversion is implict.<o:p></o:p></span></font><
/p>

<p class=MsoNormal><font size=2 color="#0000f0" face=Courier><span
style='font-size:10.0pt;font-family:Courier;color:#0000F0'><o:p>&nbsp;</o:p><
/span></font></p>

<p class=MsoNormal><font size=2 color="#0000f0" face=Courier><span
style='font-size:10.0pt;font-family:Courier;color:#0000F0'>But SQLLOADER is
erring out on ORA-01858 (See ORA-01858.ora-code.com). </span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>LOAD DATA <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>INFILE FILENAME <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>APPEND <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>INTO TABLE RE_STATS_STAGING<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '&quot;' <o
:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp; TRAILING NULLCOLS <o:p></o:p></span><
/font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>( <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp; RE_NAME,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp; TG_TYPE,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp; TRUNKGROUP,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp; CONNECTS,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp; HANGUPS,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp; DECLINES,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; LOOPS,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; SECONDS,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; CC_CONNECTED,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; CC_SETUP,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp; TIMESTAMP
CONSTANT &quot;to_date('_when_changed_','YYYYMMDDHH24MISS')&quot;<o:p></o:p><
/span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<o:p></o:p><
/span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Any ideas on where I am going wrong? Any thoughts or help
will be appreciated.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><br>
Thanks in advance,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Madhavi<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>