I need to list a field a certain way but sort it differently. Here is the query. Any way around this?
SELECT DISTINCT tsgroup
FROM master
ORDER BY RIGHT(RTRIM(tsgroup), 3),
LEFT(rtrim(tsgroup), 3)
You can use GROUP BY
instead
SELECT tsgroup
FROM master
GROUP BY tsgroup
ORDER BY RIGHT(RTRIM(tsgroup), 3),
LEFT(RTRIM(tsgroup), 3)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With