Just add an order by clause to the statment withthe field you want, it doesn't have to be in th eselect list (although I would personally put it inthe select list while testing to make sure I was getting the results I wanted.)
I did not mention that I am using "SELECT DISTINCT" statement.
This does not permit you to use a column in the order by clause that is not in the Select clause.
Well as I see it you have have two choices. Put the field inteh select list or write a query that enables you to not use Select Distinct. If you provide your query we could possibly provide some advice on the latter, but the first choice is definitely the simplest.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.