[thelist] ASP Sort Question

Eric Vitiello evolt at perceive.net
Thu Feb 21 07:25:01 CST 2002


-- jay.blanchard at thermon.com [Thu, 21 Feb 2002 06:36:20 -0600]:
>xx-xxxx-xx
>
>The person who requested this report wants the report sorted by the
>middle four numbers of the project number. I have tried methods in both SQL and ASP.

since you're using SQL, I would suggest:

SELECT projectid, other_value ORDER BY SUBSTRING(projectid,4,4)

this will order it by the substring starting at the fourth character,
and 4 characters long, thus giving you what you're looking for.

you'll of course have to modify the column names, but that should work for you.

---
Eric Vitiello
Perceive Designs
<www.perceive.net>




More information about the thelist mailing list