Information générale
Catégorie:
Codage, syntaxe et commandes
Not sure if this is what you are after but it may set you on the right track.
The SQL statement below will identify detail_no's with more than one entry:
SELECT detail_no, count(*) cnt FROM table GROUP BY detail_no HAVING cnt > 1
>Hello Everyone!!!
>I have a table has a field that is called Detail_no.
>In this table I have some detail_no's that have duplicates and that is fine because one stands for a shipped record and the other stands for a recieved record.
>
>However, I need the detail_no's that do not have a duplicate.
>(shipped but Not received or Received but not shipped )... I know that does not make sense but it happens.
>I am trying to find the best or Fastest way to do this because I a dealing with a table that starts out with over 400,000 records and eventually comes down to maybe 600.
>I don't know if there is a function to do this or not. But any help would be greatly appreciated.
>
>Thanks in advance
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement