Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Apr 2nd, 2008, 11:44 AM   #11
A.K.Al Shamsi
Programmer
 
A.K.Al Shamsi's Avatar
 
Join Date: Mar 2008
Posts: 35
Rep Power: 0 A.K.Al Shamsi is on a distinguished road
Re: Oracle 10g

i see thanks
A.K.Al Shamsi is offline   Reply With Quote
Old Apr 2nd, 2008, 1:11 PM   #12
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

You're welcome
__________________
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
Old Apr 6th, 2008, 4:23 AM   #13
A.K.Al Shamsi
Programmer
 
A.K.Al Shamsi's Avatar
 
Join Date: Mar 2008
Posts: 35
Rep Power: 0 A.K.Al Shamsi is on a distinguished road
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');
A.K.Al Shamsi is offline   Reply With Quote
Old Apr 7th, 2008, 8:36 AM   #14
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
Re: Oracle 10g

Remove the space in "120 000". I believe IR's been through this already.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 7th, 2008, 9:16 AM   #15
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

Indeed.
__________________
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
Old Apr 7th, 2008, 9:43 AM   #16
A.K.Al Shamsi
Programmer
 
A.K.Al Shamsi's Avatar
 
Join Date: Mar 2008
Posts: 35
Rep Power: 0 A.K.Al Shamsi is on a distinguished road
Re: Oracle 10g

ok... i removed the space... still i get an error missing comma..... is there anything missing??
A.K.Al Shamsi is offline   Reply With Quote
Old Apr 7th, 2008, 11:13 AM   #17
A.K.Al Shamsi
Programmer
 
A.K.Al Shamsi's Avatar
 
Join Date: Mar 2008
Posts: 35
Rep Power: 0 A.K.Al Shamsi is on a distinguished road
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');
A.K.Al Shamsi is offline   Reply With Quote
Old Apr 7th, 2008, 12:47 PM   #18
Ooble
I eat cake for breakfast.
 
Ooble's Avatar
 
Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9 Ooble is on a distinguished road
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.
__________________
Me :: You :: Them
Ooble is offline   Reply With Quote
Old Apr 7th, 2008, 12:51 PM   #19
A.K.Al Shamsi
Programmer
 
A.K.Al Shamsi's Avatar
 
Join Date: Mar 2008
Posts: 35
Rep Power: 0 A.K.Al Shamsi is on a distinguished road
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??
A.K.Al Shamsi is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:48 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC