B
bhammer
I want to copy the CodeID value from one record to another, in the same
table, to a certain record where a part of the Doc_Number (for the record
with the CodeID) is found in the Comment field (for the record with a blank
CodeID).
Table Example:
ID CodeID Doc_Number Comment
23 16 DCS01234.jpg Yada, yada, yada.
55 0 DCS09876.jpg Blah, blah, blah. 1234.
The result should copy the 16 from record 23 into the CodeID field for
record 55. This is because the "1234" four-digit string before the file
extension was found somewhere in the Comment field of the other record.
Here's what I have tried so far:
UPDATE tblObservations SET tblObservations.CodeID = "CodeID"
WHERE (((tblObservations.Comments) Like Left(Right("Doc_Number",8),4)));
I'm on the wrong track . . .
table, to a certain record where a part of the Doc_Number (for the record
with the CodeID) is found in the Comment field (for the record with a blank
CodeID).
Table Example:
ID CodeID Doc_Number Comment
23 16 DCS01234.jpg Yada, yada, yada.
55 0 DCS09876.jpg Blah, blah, blah. 1234.
The result should copy the 16 from record 23 into the CodeID field for
record 55. This is because the "1234" four-digit string before the file
extension was found somewhere in the Comment field of the other record.
Here's what I have tried so far:
UPDATE tblObservations SET tblObservations.CodeID = "CodeID"
WHERE (((tblObservations.Comments) Like Left(Right("Doc_Number",8),4)));
I'm on the wrong track . . .