Hi,
you could split up the queries to execute one for Monday, Tuesday... Friday. Then you can process the result sets in the order you want.
Otherwise I would store ordinals in the database like Monday = 0, Tuesday = 1 and so on.
--
SvenC
Hi,
instead of using one SqlCommand with an order by clause you could set up one SqlCommand which selects only rows where Day = Monday, a second SqlCommand which selects Day = Tuesday and so on. So you end up with one DataSet or DataTable per day.
Otherwise you would have to modify the table to change how your day is represented. Change it from varchar to int, and store 0 instead of 'Monday' and 1 instead of 'Tuesday', so the numbers sort like you want the days to sort.
Does that help you?
--
SvenC
No comments:
Post a Comment