Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting

Status
Not open for further replies.

anth1977

Programmer
Mar 17, 2002
5
US
Hello everyone,

I'm trying to sort a table in Access on a specific column in ascending order.

I have one record, however, that I want to always come up last (past z in otherwords). Can you tell me what character (* & @ ^ @ ) that you know of that has a value greater than z so when I sort, it appears as the last record in the recordset.

Thanks!

-Anthony
 
That sure is a mother. I made a table with characters up to "character 255" and nothing would top lowercase z! Sorry.

FWIW, a quick way to enter special characters is to hold the alt key down while entering the 3 digit code on the numeric keypad. Try alt-049 and alt-253, even in notepad. I used this to generate an extensive table, and I gotta tell you, the sorting method is queer, queer, queer. Where would you expect to find the degree symbol or Greek Beta?!

So, to solve this, how about building a field that is blank normally, and, say, asterisk for your special boy. To that concatenate the field itself; and sort on the concatenated concoction. Just don't print it - only show the field itself ... although an asterisk on the special boy might not look too bad ...

Another idea might be to sort on Asc([foo]) to get a legitimate sorting order.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top