bad database

baksuz

Registered User.
Local time
Today, 17:17
Joined
Jan 25, 2005
Messages
12
hello i have this problem with my database i have data base with 195000 records,but when I try distinct function on number of company (ICO) i get 145000 records.so 50000 records have duplicats, this is not nice to work with it. so can anyone tell me how can I get just those 145000 records without duplicats with SQL stratement.

thank you
 
You can create a Totals Query in query Design View, choose Group By for the ICO field and choose First (or Last) for each of the rest of the fields. If you want to, you can change the query into a make-table query to create a new table with unique ICOs.
 
sorry I don't understand this completly,can you maybe give me some SQL statment for example

thank you
 
The query based on your table in the other thread would be:-

SELECT First(Tabela.DIC) AS DIC, Tabela.ICO, First(Tabela.LONG_NAME) AS LONG_NAME,
First(Tabela.PSCB) AS PSCB, First(Tabela.DESCRIPTIO) AS DESCRIPTIO,
First(Tabela.PRAVNAFORM) AS PRAVNAFORM
FROM Tabela
GROUP BY Tabela.ICO;
 

Users who are viewing this thread

Back
Top Bottom