I need to be able to custom sort values that come from a query basically i have a query like this
SELECT Name from Table
and i want to be able to custom order the values
Ideally, it would add an extra field to the SQL query at runtime so the result would be something like this
Name SortOrder
------------------------------------
John 1
Sam 2
Susan 3
Andy 4
Microsoft SQL Server 2008SQL
Last Comment
Jim Horn
8/22/2022 - Mon
Jim Horn
Expand on 'custom sort'. Are you trying to get an incrementing integer value for each name, or establishing a sort order other than A-Z name?
vbnetcoder
ASKER
establishing a sort order other than A-Z name?
vbnetcoder
ASKER
sorry: My comment was a statement in answer to your question not intended to be a question.
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.