troubleshooting Question

SQL sort

Avatar of mikeydk
mikeydkFlag for Denmark asked on
Microsoft SQL ServerSQL
15 Comments1 Solution102 ViewsLast Modified:
Hey

I would like to sort the SQL query as shown below (first all with DDD, then AAA and then BBB)

Is it possible?

"select * from hardware where status = 1 and (ref = 'BBB' or ref= 'AAA' or ref = 'DDD')"

PC4 DDD
PC5 DDD
PC6 AAA
PC7 AAA
PC1 BBB
PC2 BBB
PC3 BBB
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 15 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 1 Answer and 15 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