| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
|||
Need to eliminate dupes sharing first 10 digitsNeed to eliminate dupes sharing first 10 digits, but keep the highest valued entry.
IE: 8001234567 800123456701 800123456702 900345678901 900345678903 .... From just these 5 entries, I would like to just get these results: 800123456702 900345678903 Thanks, and I appreciate any help/information ![]() |
|
|||
SELECT MAX(v) FROM ie GROUP BY SUBSTRING(v FROM 1 FOR 10);? I think this is valid SQL92, but I am not sure. You may want to modify the substring if your engine does not support this syntax (the syntax itself is certainly valid) HTH, Dimitar |