![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#11 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Oracle 10g
i see thanks
|
|
|
|
|
|
#12 |
|
Programming Guru
![]() ![]() ![]() |
Re: Oracle 10g
You're welcome
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#13 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Oracle 10g
i corrected the datatype for rental_amount but still i get error "missing comma" ??!!!
INSERT INTO tbl_lease (lease_id, lease_name, rental_amount, lease_signdate, begin_date, end_date)
VALUES ('110', 'Gardern2', 120 000, '15-Jan-2008', '23-Jan-2008', '23-Jan-2009'); |
|
|
|
|
|
#14 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Re: Oracle 10g
Remove the space in "120 000". I believe IR's been through this already.
|
|
|
|
|
|
#15 |
|
Programming Guru
![]() ![]() ![]() |
Re: Oracle 10g
Indeed.
__________________
http://jasonpowers.net "There are a thousand hacking at the branches of evil to one who is striking at the root." |
|
|
|
|
|
#16 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Oracle 10g
ok... i removed the space... still i get an error missing comma..... is there anything missing??
|
|
|
|
|
|
#17 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Oracle 10g
ok..... now what is this error about???
![]() here is the code ALTER TABLE tbl_lease ADD CONSTRAINT pk_lease PRIMARY KEY (lease_id); alter table tbl_lease add constraint fk1_lease_property foreign key (unit_id) references tbl_property (unit_id); alter table tbl_lease add constraint fk2_lease_renter foreign key (renter_id) references tbl_renter (renter_id); here is the sample of the data which i want to include INSERT INTO tbl_lease (lease_id,lease_name, renter_id,unit_id, rental_amount, lease_signdate, begin_date, end_date)
VALUES ('110','200','350', 'Gardern2', 120000, '15-Jan-2008', '23-Jan-2008', '23-Jan-2009'); |
|
|
|
|
|
#18 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
Re: Oracle 10g
It seems the renter_id '350' is not in the tbl_renter table. The thing about foreign keys is there must be a local value before you can have a foreign value pointing to it.
|
|
|
|
|
|
#19 |
|
Programmer
Join Date: Mar 2008
Posts: 35
Rep Power: 0
![]() |
Re: Oracle 10g
i think first we should assign it as foreign key... it is not on tbl_renter because i want to insert data in tbl_lease.... so is it better to insert data in tbl_renter first then insert the rest of the data in tbl_lease??
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ORA-01034: ORACLE not available -- Why does this occur??! | Thecy | ASP | 4 | Apr 8th, 2008 9:33 AM |
| Is Oracle any good? | UnKnown X | Other Programming Languages | 22 | Apr 3rd, 2008 8:47 AM |
| ORACLE Database Setup | hbe02 | Other Programming Languages | 1 | Nov 2nd, 2006 12:47 PM |
| Will a project developed in VB and Oracle run on any windows machine ?? | mohitdhaigude | Visual Basic | 2 | Feb 24th, 2006 1:00 PM |
| creating user problem ORACLE database | gpreetsingh | Coder's Corner Lounge | 1 | Feb 19th, 2006 3:33 AM |