troubleshooting Question

Query distinct on numeric and character

Avatar of sl1nger
sl1nger asked on
Microsoft SQL Server
6 Comments2 Solutions423 ViewsLast Modified:
I currently have a query that does a distinct, so I can order the values on the screen.

select distinct CONVERT(real, RTRIM(REPLACE(Height, 'mm', ''))), Height from TEST_DATA where series = 'ABC' ORDER BY CONVERT(real, RTRIM(REPLACE(Height, 'mm', ''))) ASC

It works fine, but problem now... I don't have all numeric values in the 'xxmm' format in my Height records.
Now I have 2 records with 'Edge' in the record.  So, I need to find a new way to order the above query with these new records.
ASKER CERTIFIED SOLUTION
orcic

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros