I have a field in my database with values that INCREASE (they never decrease). I need to find a way of selecting the NON-DUPLICATE rows.
IMPORTANTCode:NUM 1 2 2 3 4 4 4 4 5 5 6 7 8 8
The DISTINCT keyword is no use to me. By using the distinct keyword for the example above I'd be left with only the values that occur once. But I also want ONE OF EACH of the duplicated rows to be left as well.
So the example above would become:
This is because the values that occur only once are selected (this is what DISTINCT does) but then the values that occur multiple times are selected only ONCE.Code:NUM 1 2 3 4 5 6 7 8
I'm sorry if I sound like I've over-explained this, but I've had trouble trying to tell people what I need- people keep recommending the DISTINCT keyword.
Thanks in advance- I hope you can help.



Reply With Quote

Bookmarks