Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with database records

Status
Not open for further replies.

vinanti

Programmer
Mar 7, 2003
26
IN
Hi there,
I have two dbase.in 1 of the dbases I have about 4592 records and in the other 3433 records.The fields in the first dbase are:
id ,name,urls and in the 2nd dbase the fields are urls,name.
i want to put the same name as in the 1st table for all the records in the 2nd table's name field based on the condition that the url of 2nd table exists in the 1st table.

could anybody help plz.


bye vinanti
 
Hi vinanti,

Try this first in a Copy of your DB!

Paste this into a new query:

UPDATE Table1 INNER JOIN Table2 ON Table1.urls = Table2.urls SET Table2.name = [Table1].[name];

Change Table1 and Table2 to your Table Names. This assumes that both Tables are in the same Database. As this appears to be a one-off exercise, if the Tables are in different Databases import one of the Tables so that both Tables are in the same DB. Hope that makes sense. Then Run the above Query.

Make a Backup of all your Data before attempting this! If I've got it wrong this action is irreversible.

Bill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top