Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
Rem *** Remove duplicate entries *** SQL$ = "SELECT [Mach], [Datim], COUNT(*) - 1 From [Tunl_CustHist] GROUP BY [Mach], [Datim] HAVING COUNT(*) > 1" rs.Open SQL$, verDB, adOpenForwardOnly, adLockReadOnly While Not rs.EOF If booSQLServer Then 'global variable telling me which type of database I'm dealing with SQL$ = "DELETE FROM [Tunl_CustHist] WHERE [Mach] = " & CInt(rs![Mach]) & " AND [Datim] = '" & rs![datim] & "'" Else SQL$ = "DELETE * FROM [Tunl_CustHist] WHERE [Mach] = " & CInt(rs![Mach]) & " AND [Datim] = #" & rs![datim] & "#" End If verDB.Execute SQL$, , adExecuteNoRecords rs.MoveNext Wend rs.Close
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|VB/VBA Fast String Concatenate Class||6,550|
|Spell check a VBA or VB6 ActiveX textbox||6,336|
|Intercepting Office Ribbon Control Events with VBA using "Repurposing" Commands||3,310|
|A Game of Draw Poker||326|