I’m a newbie for SQL Server. Please help me out with my below problem.
I’ve a table as below,
Job Quantity Status
1 100 OK
2 400 HOLD
3 200 HOLD
4 450 OK
I would like to write a query now in such a way that all the Jobs with Quantity equal to or more than 400 with status OK would appear first then Jobs with Quanitty equal to or more than 400 with status HOLD. Then all the Jobs with Quantity less than 400 with Status OK would appear and after that Jobs with quantity less than 400 with status HOLD should appear.
Here’s how my result should appear. (Sorry for the above confusing paragraph)
Job Quantity Status
4 450 OK
2 400 HOLD
1 100 OK
3 200 HOLD
How do I do this? Some one please help me out
1 Answer