Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Feb 2009
    Posts
    36
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question MySQL Table Merging

    I am working on a system to provide remote updates to installations of my software. Basically, the remote installation will grab the update zip file from my server and copy appropriate files.

    In certain cases, a database structure update may be required as well. What would be the best method to accomplish this? Ideally, all of the information contained within the database would be copied to the corresponding columns in the new table structure. The problem seems to lie in transferring table rows when a column no longer exists.

    For example, in a system configuration table, the column "TestURL" is no longer needed, and is removed in the new table structure. When I export the original table data, this column exists, but when I try to import the data an error is thrown that the column does not exist.

    Rather confusing to explain, I hope this makes sense to someone who has encountered and solved this before. Thanks!

  • #2
    eak
    eak is offline
    Regular Coder eak's Avatar
    Join Date
    Jun 2002
    Location
    Nashville, TN
    Posts
    354
    Thanks
    0
    Thanked 26 Times in 26 Posts
    have you ever used insert select queries?

    http://dev.mysql.com/doc/refman/5.1/...rt-select.html
    eak | "Doing a good deed is like wetting your pants; every one can see the results, but only you can feel the warmth."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •