Now, chill out and take one of those there clean copies of the database you've got and go for it.
Its a copy..so we can do-over if this isn't want ye want.
Ready!!!
so using your test DB:
Step 1:
To get to SQL view on queries:
Click on Queries in Object List
Click NEW on menu, choose Design View, click close on show table window
Top left corner, click SQL, delete the "SELECT;" that is there.
Step 2:
Copy and paste in this query.
SELECT calibrations.*
FROM calibrations
WHERE (((calibrations.cust_ref) Is Null));
have a look-see in there..if your happy that only the 8000-ish new rows have an empty cust_ref, then we're in business.
Take note of the number of rows returned.
Proceed to step next step :)
Step 3:
repeat step 1
UPDATE calibrations SET calibrations.cal_ref = 1
WHERE (((calibrations.cust_ref) Is Null));
a box will alert you to say " x records will be updated" does that match your number of rows form the Select query?
If yes, click ok.
repeat step 1
UPDATE calibrations SET calibrations.cert_no = "nocert"
WHERE (((calibrations.cust_ref) Is Null));
a box will alert you to say " x records will be updated" does that match your number of rows form the Select query?
If yes, click ok.
Step 4:
If all has gone well so far, make a copy of the database in case this goes wrong.
repeat step 1
UPDATE calibrations INNER JOIN instruments ON calibrations.Inst_ID = instruments.Inst_ID
SET calibrations.cust_ref = instruments.cust_ref;
You do not need a where clause on this, thats what the inner join is kind of for. it links the records on the Inst_ID.
So basically, it is saying update it where these two fields match each other.
Now, if you get syntax errors or something I'll blame you, because I have created tables and ran the queires to test
that they work and they work just fine for me. :)
If all of this works, you better give me a thumbs up for this..if not I will hunt you down. :)