Home » SQL & PL/SQL » SQL & PL/SQL » Duplicating two tables (oracle 9i)
Duplicating two tables [message #407550] Wed, 10 June 2009 07:57 Go to next message
arv_rehal
Messages: 4
Registered: July 2008
Location: Mississauga
Junior Member

Hi All,

I have 2 table with similar structure. My one table is have records with 5 unique fields and lot of dependence on it. Now I want to copy the data into second similar table along with all dependence. Can someone help me out of this.

Thanks

Arvinder
Re: Duplicating two tables [message #407552 is a reply to message #407550] Wed, 10 June 2009 08:10 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What kind of dependencies?

Regards
Michel
Re: Duplicating two tables [message #407553 is a reply to message #407552] Wed, 10 June 2009 08:19 Go to previous messageGo to next message
arv_rehal
Messages: 4
Registered: July 2008
Location: Mississauga
Junior Member

Hi,

like constraints,... foreign keys

Thanks
Re: Duplicating two tables [message #407554 is a reply to message #407553] Wed, 10 June 2009 08:22 Go to previous messageGo to next message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And you want to copy dependent data to what?
Say a row in your table1 has a child in another table, you copy the row into table2 and table1 row child into what?

Regards
Michel
Re: Duplicating two tables [message #407558 is a reply to message #407554] Wed, 10 June 2009 08:42 Go to previous messageGo to next message
arv_rehal
Messages: 4
Registered: July 2008
Location: Mississauga
Junior Member

Hi,

I am using a CISCO communication software in that it required 2 tables one publisher and other subscriber. When we run this, subscriber takes the information from publisher and my phone systems works. But if the data is not same in these two tables then it wont. Last week what happen my hard disk got crashed in which my publisher database was there. Now when i restored it from my backup the information in 2 tables are different. Now Subscriber is having latest information. In order to run my system i need to transfer the data from subscriber to publisher table, but my publisher table is not allowing me to delete, update and insert into it.

My both the table is having similar dependencies and constraints. If by any mean we can copy the informaiton from one table to other, it will be ok.

Thanks
Re: Duplicating two tables [message #407572 is a reply to message #407558] Wed, 10 June 2009 09:58 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
This looks like the crux of the problem:
Quote:
my publisher table is not allowing me to delete, update and insert into it.


What error message do you get when you try to insert, update or delete data?
Re: Duplicating two tables [message #407574 is a reply to message #407572] Wed, 10 June 2009 10:04 Go to previous messageGo to next message
arv_rehal
Messages: 4
Registered: July 2008
Location: Mississauga
Junior Member

When i do update/delete it give the name of field from other table which is depending on the value of this table.
Re: Duplicating two tables [message #407576 is a reply to message #407550] Wed, 10 June 2009 10:06 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
You need to help us by following the Posting Guidelines as stated below.
http://www.orafaq.com/forum/t/88153/0/
Go to the URL above click the link "Posting Guidelines"
Go to the section labeled "Practice" & do as directed.

use CUT & PASTE so we can see what you are actually doing & how Oracle responds
Re: Duplicating two tables [message #407591 is a reply to message #407574] Wed, 10 June 2009 11:16 Go to previous messageGo to next message
JRowbottom
Messages: 5933
Registered: June 2006
Location: Sunny North Yorkshire, ho...
Senior Member
Quote:
When i do update/delete it give the name of field from other table which is depending on the value of this table.


Could you give us a little help here.

Show us an actual Oracle error message that you get.


Re: Duplicating two tables [message #407611 is a reply to message #407574] Wed, 10 June 2009 12:53 Go to previous message
joy_division
Messages: 4643
Registered: February 2005
Location: East Coast USA
Senior Member
arv_rehal wrote on Wed, 10 June 2009 11:04
When i do update/delete it give the name of field from other table which is depending on the value of this table.


It might be an application error, but this is another case of you don't show us the real message, so you're going to get lots of incorrect answers.

[edited contraction]

[Updated on: Thu, 11 June 2009 08:06]

Report message to a moderator

Previous Topic: sql
Next Topic: Converting Date
Goto Forum:
  


Current Time: Thu Dec 08 22:31:40 CST 2016

Total time taken to generate the page: 0.13975 seconds