dataset & & row order

Posted on 2004-04-06
Last Modified: 2007-12-19
I have a dataset.  One of the columns is "DIRECTORPositionheld".  I need to move the row where DIRECTORPositionheld = "President" to the top of this dataset, before I bind it to a datalist object.
Question by:dbyrne03
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 10

Expert Comment

ID: 10769542
you have to refill the datatable of the dataset with "order by DIRECTORPositionheld". you have to requery the database if is that what you want to know

Author Comment

ID: 10769767
right now the sql that I'm using to fill the dataset is :
If I use :
it will put the accountant above the director above the  president above the treasurer .  What sql would I use to place the president at the top?
LVL 10

Accepted Solution

EBatista earned 100 total points
ID: 10771322
there is not sql sentece avaible to do what you want, you are forced to use some kind of trick, you could add a column to the database table that express the category and the values could be numbers or letters:
DIRECTORPositionheld    Category
accountant                          4
director                              2
president                            1

then set the order by to that category column  


Author Comment

ID: 10771941

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question