Thread: Oracle 10g
View Single Post
Old Apr 2nd, 2008, 10:01 AM   #10
Infinite Recursion
Programming Guru
 
Infinite Recursion's Avatar
 
Join Date: Jul 2004
Location: United States
Posts: 3,467
Rep Power: 8 Infinite Recursion is on a distinguished road
Send a message via MSN to Infinite Recursion Send a message via Yahoo to Infinite Recursion
Re: Oracle 10g

Sorry for my initial posts... they were a bit inaccurate. I missed the part where you were defining which rows you wanted to insert into. I think a large part of your problem is that the numeric you are entering for rental_amount is enclosed in quotes (its not a string, so they need to be removed), the space in the rental_amount still needs to be removed, then you will need to make sure your dates are in the correct format that Oracle expects.

I recreated your table in MySQL and added a line to test...

mysql> desc tbl_lease;
+----------------+---------------+------+-----+---------+-------+
| Field          | Type          | Null | Key | Default | Extra |
+----------------+---------------+------+-----+---------+-------+
| LEASE_ID       | char(14)      | NO   |     |         |       | 
| RENTAL_AMOUNT  | decimal(10,0) | YES  |     | NULL    |       | 
| BEGIN_DATE     | date          | YES  |     | NULL    |       | 
| END_DATE       | date          | YES  |     | NULL    |       | 
| LEASE_SIGNDATE | date          | YES  |     | NULL    |       | 
| LEASE_NAME     | varchar(15)   | YES  |     | NULL    |       | 
+----------------+---------------+------+-----+---------+-------+
6 rows in set (0.05 sec)

mysql> INSERT INTO tbl_lease VALUES ('Gardern1', 120000, '2008-01-01', '2008-01-10', '2009-01-10','Test');
Query OK, 1 row affected (0.00 sec)

mysql> select * from tbl_lease;
+----------+---------------+------------+------------+----------------+------------+
| LEASE_ID | RENTAL_AMOUNT | BEGIN_DATE | END_DATE   | LEASE_SIGNDATE | LEASE_NAME |
+----------+---------------+------------+------------+----------------+------------+
| Gardern1 |        120000 | 2008-01-01 | 2008-01-10 | 2009-01-10     | Test       | 
+----------+---------------+------------+------------+----------------+------------+
1 row in set (0.00 sec)
__________________
http://jasonpowers.net

"There are a thousand hacking at the branches of evil to one who is striking at the root."
Infinite Recursion is offline   Reply With Quote