General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>Dear All,
>
>Can someone help me find the correct syntax of a SQL statement would eliminate the duplicates?
>
>I have a table: 'mytable'. It has 3 fields: ID, NAME and REF
>
>ID | NAME | REF
>1 | Dupuis | 200817 *
>2 | Durand | 200817
>3 | Michiels | 200818 *
>4 | Dulome | 200819
>5 | Pernut | 200820 *
>6 | Bloquier | 200820
>7 | Moureau | 200820
>8 | Pirotte | 200821 *
>9 | Marchand | 200821
>
>
>I would like the SQL statement to return only the records that are tagged (all fields).
>
>How can I do this?
>
>Thanks to all,
>Pat
Not sure, what do you mean here, "duplicates". For instance, why #1, not #2? What is the logic behind "I would like" to return "Dupuis | 200817", but not " Durand | 200817" ? Why to return both, #6, and #7 having the same REF ?
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only