January 19, 2008, 11:55 PM

This is another real-time mistake I faced today. I was parsing a log file and uploading into DB. One of the dates in the log file doesnt follow the date format. So I got this error. I cant give that code in this post, I am giving an example below.
SQL> select to_date('20051101 00:00:01', 'YYYYMMDD') from dual ;
select to_date('20051101 00:00:01', 'YYYYMMDD') from dual
*
ERROR at line 1:
ORA-01830: date format picture ends before converting entire input string
I hope you have noticed the error. The query should be like this.
SQL> select to_date('20051101 00:00:01', 'YYYYMMDD hh24:mi:ss') from dual ;
TO_DATE('
---------
01-NOV-05
You can have a detailed view on the Oracle date formats here
http://www.ss64.com/orasyntax/fmt.html
January 19, 2008, 12:19 AM

I cant explain this problem better than the following URL.
http://www.oracle.com/technology/sample_code/tech/pl_sql/htdocs/x/Bulk_Binding_Enhancements/Handling_And_Reporting_Exceptions.htm
I am using a PL/SQL array object to populate a table. The exceptions are being saved, so that the row wise problems can be logged and the process cannot be stopped because of that problem or exception. While updating the columns, there was an exception while parsing a string as date, – I hit with this issue. (I disable exception save and find out this
), When I rectfied that date parsing issue, I came out of this problem!
Are you asking about that date problem, I will be writing a separate post tomorrow! feeling sleepy now!
January 19, 2008, 12:08 AM

Again an update caused this this issue. I had dropped a few columns from a table here and there. I have updated the necessary procedure populates that table. Beautifully, I executed the java code, loading that table with out changing that. varchar is assigned to date and viceversa. I hit with this issue. PLS-00306 Error: Wrong number of types of arguments in call to procedure So, no way, I corrected them all. and it is working fine
January 18, 2008, 11:57 PM

This is a silly mistake. Let me tell you what. I am inserting some values to a table. see the following query.
insert into mytable (col1, col2) values ('tanya', 'mega', 'harish')
ORA-00913: too many values
so you got it
we can identify this easily when updating less number of variables, I was updating 90+ columns, and I have given some extra values. what to do.. remove the extra..!
http://www.techonthenet.com/oracle/errors/ora00913.php
January 18, 2008, 11:46 PM

Hi,I had created some procedure and I tried to execute it with sqlplus. That time I hit with this error.
SQL>@ c:\temp\uploaddata.sql
SP2-0734: unknown command beginning "upload [..." - rest of line ignored.
actually upload is a local variable I am trying to declare and assign some value. but I found later there are some unwanted characters being entered in the sql file. On removing it, it is running like a tiger! Sometimes, there may be some formatting characters inserted by editors also cause this error, somebody told in some website!