MySQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMySQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 7th, 2005, 03:40 PM
sewage sewage is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 50 sewage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 35 sec
Reputation Power: 5
consolidating tables

hopefully someone here can help me out....I need to transfer all of my records from multiple tables into one table, is there an easy way to do this with out transferring every single record one by one?? I was thinking about dumping the tables and then using update or something to put the dumped records in the new table(I dont exactly know how to actually do that though), all the tables have the same format and number of columns...please help

Reply With Quote
  #2  
Old January 10th, 2005, 08:01 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
I usually use a programming language.

I'll develop a script which simply grabs all the data I want from the table and prints out INSERT statements that I can use to make the new table.

Its the easiest solution i've used =)
not sure if there's any more efficient ones though.

Reply With Quote
  #3  
Old January 10th, 2005, 05:19 PM
Madpawn Madpawn is offline
My beat is correct.
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 339 Madpawn User rank is Private First Class (20 - 50 Reputation Level)Madpawn User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Days 22 h 3 m 33 sec
Reputation Power: 4
Look over MySQL's INSERT...SELECT functionality; it's used for building queries that fill one table with the contents of others.

Reply With Quote
  #4  
Old January 12th, 2005, 09:11 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
wow! good catch Madpawn...

The documentation seems a little weak, but the ideas are there...

nice!

Reply With Quote
  #5  
Old January 15th, 2005, 05:04 PM
sewage sewage is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 50 sewage User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 22 m 35 sec
Reputation Power: 5
the INSERT SELECT did the trick with minimal problems

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMySQL Development > consolidating tables


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway