BlueUnicorn Posted June 17, 2007 Posted June 17, 2007 the first problem was two different structured databases that I need to copy the info from the table users into another database table user. I managed to copy the whole thing to the new database with a new table named users so I need to convert it to the table user. User has name Users has fname and lname How do I go about inserting the fname and lname into another table called sname. Bear in mind that I need a space after fname. I think it would be with the insert command but I can't seem to figure out the proper terms. Any Help will be greatly appreciated. Thanks Cindy The Blue Unicorn Quote
TCH-Bruce Posted June 18, 2007 Posted June 18, 2007 Welcome to the forums Cindy Maybe this tutorial will help get you started. Quote
TCH-Andy Posted June 18, 2007 Posted June 18, 2007 Welcome to the forums Cindy Did you manage to get it sorted ? Quote
carbonize Posted June 18, 2007 Posted June 18, 2007 INSERT INTO tablename (fieldname1, fieldname2, fieldname3) VALUES (value1, value2, value3) You can make it shorter if you know the order of your fields in which case you can drop the field names. Quote
telcor Posted June 21, 2007 Posted June 21, 2007 >INSERT INTO User(name) SELECT CONCAT(fname, ' ', lname) AS old_names FROM Users; That's just off the top of my head so there is likely an error or two in it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.