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 TouchToneTommy 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.

Excelerate2004

Programmer
Mar 8, 2004
163
CA
This should be simple, but I can't work it out, I have two tables:

1. Master
2. Merge

I want to update the field in the Merge table called 16944 with the values that are in the Master table in a field called Call, only when the field in Master, ASSAY_ID = 16944.

The Primary Key in both tables is called SAMPLE_ID

So in terms of Pseudo code:

UPDATE 16944
FROM Merge
WHERE [Merge]![16944] = [Master]![CALL]

Am I on the right track? What am I missing?

Thanks for any help I can get.




 
Code:
update Merge
inner 
  join Master 
    on Merge.SAMPLE_ID 
     = Master.SAMPLE_ID
   set Merge.[16944] 
     = Master.CALL
 where Master.ASSAY_ID 
     = 16944

rudy
SQL Consulting
 
Thanks rudy!

It was the join that I was having trouble with...even with the query wizard I couldn't get it set up properly.

Thanks for your help!!

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top