coperations07
asked on
SQL Update Criteria
Hi,
I'm trying to create an update query that will update a table in Access. I want to flag all the records that have duplicate values in one of the columns. The flag will be a 'N' value in a corresponding column for a dupe record. I have two queries that I've been trying to make work together, but no luck so far.
To set the flag:
UPDATE tbl_os_reverse_save SET tbl_os_reverse_save.FILL = Left([tbl_os_reverse_save] ![FILL],Le n([tbl_os_ reverse_sa ve]![FILL] )-1) & 'N'
To find the dupes:
SELECT First(tbl_os_reverse_save. [WHLSL AGIN]) AS [WHLSL AGIN Field], Count(tbl_os_reverse_save. [WHLSL AGIN]) AS NumberOfDups
FROM tbl_os_reverse_save
GROUP BY tbl_os_reverse_save.[WHLSL AGIN]
HAVING (((Count(tbl_os_reverse_sa ve.[WHLSL AGIN]))>1))
I'm trying to create an update query that will update a table in Access. I want to flag all the records that have duplicate values in one of the columns. The flag will be a 'N' value in a corresponding column for a dupe record. I have two queries that I've been trying to make work together, but no luck so far.
To set the flag:
UPDATE tbl_os_reverse_save SET tbl_os_reverse_save.FILL = Left([tbl_os_reverse_save]
To find the dupes:
SELECT First(tbl_os_reverse_save.
FROM tbl_os_reverse_save
GROUP BY tbl_os_reverse_save.[WHLSL
HAVING (((Count(tbl_os_reverse_sa
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER