Update Query: Replace data with data from other table

ggodwin

Registered User.
Local time
Today, 07:35
Joined
Oct 20, 2008
Messages
112
I have a table [QREVALUE] That has some incomplete data because I did not give enough text places when I initially set up the table. I would like to go back and repair the missing text with the correct text from [SkpiProblemLog]

Both tables have a comon Unique identifier in field [TagNumber]

*** I have a couple of records where the TagNumber is NULL...These do not need to be updated***

Summary:
QREVALUE.[ScrapTagRecord] needs to be updated with the Values that are in SkpiProblemLog.[ScrapTagRecord] for all records where [TagNumber] are equal.

What is the syntax for a simple Update query that would do this.

Here is what I tried and got a "enter Parameter" prompt...
Code:
UPDATE QREVALUE
INNER JOIN SkpiProblemLog  ON QREVALUE.TagNumber = SkpiProblemLog.TagNumber
SET QREVALUE.ScrapTagRecord = SkpiProblemLog.ScrapTagRecord
 
Hi,

try this:

UPDATE QREVALUE, SkpiProblemLog
SET QREVALUE.ScrapTagRecord = SkpiProblemLog.ScrapTagRecord
WHERE QREVALUE.TagNumber = SkpiProblemLog.TagNumber

Simon B.
 
Just thought you might like to know that you helped me get past one HUGE problem i have been experiencing in my db. I was using an update query but it just wasn't working out for me, so i went searching and found this nice little snippet of SQL.

So, i took a look at what this does when it's thrown back into design view. The WHERE statement is criteria... something that no other tutorials or howto's even broached.
 
Gald we could help. My problem was fixed with I realized I had misspelled a entry above...
 

Users who are viewing this thread

Back
Top Bottom