I have a find dups query set up, which returns 5 fields.
I want to zero out Field 1 and Field 2 on just the duplicates. I don't want to touch Fields 3-5 on these duplicates. Is this possible to do through SQL?
Post your SQL or your select query. Does this query select all records that are dups or does it only return the extra records. I mean if there are five duplicate records is the first one the original and you are returning 2-5.
Bob Scriver Want the best answers? See FAQ181-2886 Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???
.[Net Demand]
FROM TABLE
WHERE (((TABLE.[Tracking Code]) In (SELECT [Tracking Code] FROM
As Tmp GROUP BY [Tracking Code],[Clicks],[Cost],[Impressions],[Date] HAVING Count(*)>1 And [Clicks] =
.[Clicks] And [Cost] =
.[Cost] And [Impressions] =
.[Impressions] And [Date] =
.[Date])))
ORDER BY
.[Tracking Code],
.[Clicks],
.[Cost],
.[Impressions],
.[Date];
This selects all records that are dups. I want to keep the orginal record untouched. For all the other dup records I want to zero out the fields [Clicks] & [Cost] & [Impressions] and keep the rest of the fields the same.
Generally, the concept is not in keeping with (properly) normalized record sets. If the fields are truly pawrt of the record, htey should be in the record. If they are simply related to the record, they should be in a seperate table, linked via an index (Key) to the parent.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.