Jump to content

Replace ID from one table with another where the two have


socalnate

Recommended Posts

I want to replace all Unique ID's on one table (a) with all the unique ID's from table (b) where the columns "game_name" match.  I figured this is possible because all of the game_names on both tables are unique.  Seems very simple but I can't figure out of the life of me how to do this...any ideas?  ???

 

 

 

 

Link to comment
Share on other sites

This sounds like the recipe for a total database meltdown.  I can't imagine what the database structure is like, but  why/how do you have replaceable unique ids; why do you have game_name stored in two different tables?  You might want to read something simple on database normalization as well as how record ids are the key to the relational aspects of an RDBMS

Link to comment
Share on other sites

Yeah I know...the problem I have is that a lot of info is grabbed from multiple websites so the only way to "unify" the data is to use a unique identifier other than an id so I can link the data across the tables.  It's worked so far using "UNIQUE" where in my names column where I know the names are unique.  I've also used LEFT joins with great success...but I would seriously like to copy all my ids from each table to the next. 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.