Sorting of Conditions ?

  • Thread starter Thread starter Peter
  • Start date Start date
P

Peter

There is a condition code with description for a building.

Conditions like:
Roof
Paintwork
Floor
Structural
Other remarks
....

End user wants to sort the condition in alphabetical order
BUT he wants "Other remarks" as the last item. Is there
any trick ?

Thank you for your help.
 
SELECT tblTest.Condition
FROM tblTest
ORDER BY tblTest.Condition <> "Other remarks", tblTest.Condition;
 
Select * from yourTable where <conditions and Field<>"otherColumns>
order by Filed asc
union all
Select * from yourTable where Filed="Other Columns"

Madhivanan
 
Dear Brendan,

Thank you for your advice.

Peter
-----Original Message-----
SELECT tblTest.Condition
FROM tblTest
ORDER BY tblTest.Condition <> "Other remarks", tblTest.Condition;

--
Brendan Reynolds (MVP)





.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top