Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
am creating a database application in c# and have used the query builder in the dataset to create a search query which search for records in my database. I want to sort records in ascending order after I have perform my search query but the sort query I used sort all records in my table in the database but I want it to sort for only the search query results not the whole records in the table in my database

What I have tried:

select * from boys order by firstname
Posted
Updated 25-Aug-17 21:37pm

1 solution

Try:
SQL
SELECT * FROM Boys WHERE MyColumnName = MyValueThatSelectsTheRowsIWant ORDER BY FirstName
 
Share this answer
 
Comments
MaximusDebois 26-Aug-17 3:38am    
can I replace this MyValueThatSelectsTheRowsIWant with a query
OriginalGriff 26-Aug-17 3:43am    
Well ... that is kind of the idea. MyColumnName is just a placeholder as well ...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900