View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default ADODB: duplicates -problem

I'm a little confused. You started with an INSERY statement m, but now you
want to read data?

your insert should be something like

INSERT INTO table ([field1],[field2]) values ( 'a','b')

i guess 'a' and 'b' are the params

so
sSQL= "INSERT INTO table ([field1],[field2]) values ( '%a%','%b%')"
sSQL = REPLACE(sSQL,"%a%", p1)
sSQL = REPLACE(sSQL,"%b%", p2)


your 2nd question is reading data but avoiding dulicates.
Have you tried using DISTINCT
SELECT DISTINCT [field] FROM [table]










"Adax" wrote:

Uzytkownik "dan dungan" napisal w wiadomosci
...
Hi Adax
Are you coding in Excel or Access?
Dan


I have advanced calculation in VBA in Excel and from Excel I have resalt:
matrix: 100 000 x 20. Unfortunately some from 100 000 records are duplicate
(each field, without Index certanly) and I'm looking for quick solution,
that help me separate theese duplicates. Could You help me find the good
solution for this problem? Thanks!