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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update query 1

Status
Not open for further replies.

jlg5454

Technical User
Jan 6, 2005
98
US
I want to update data in a field from one table with data from another table.

I tried something like this which gave me an error:
UPDATE 1stDump SET NewTeam = (SELECT [NewTeam] FROM NewTeamName)
WHERE PP_Number in (SELECT [PP_Number] FROM NewTeamName);

The field I want to update is NewTeam. PP_Number is common in both fields.

Thanks for any help
 
You may try this:
UPDATE [1stDump] AS O INNER JOIN NewTeamName AS N ON O.PP_Number = N.PP_Number
SET O.NewTeam = N.NewTeam

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top