Asked By
roanmitch
0 points
N/A
Posted on - 04/29/2013
Hi. I have a problem on the query that I want to happen. I want the dataset to be order in a ascending order alphabetically. I have a lot of data that I wanted to be arrange alphabetically. Really need help. Thanks in advance
Sql Database Query ascending order
The fact that you mentioned datasets tells me you are using ADO.NET with the .Net framework for programming the database.
For results in ascending order from the database to the dataset, you just write a standard Select query and execute it against the database.You then fill your dataset using a sql data adapter.You would use the code snippet like below.I write the select statement:
SELECT * FROM yourtable WHERE yourfield=condition ORDER BY yourfield ASC
Note the ASC keyword at the end.This is what gives you a sorted result set in ascending order.
Let me know if you need more help.