Sorting data before displaying

Y

youngeagle

If I am not in the correct newsgroup, my apologies, I wasn't sure if this
was a sql question or an aspnet question.

Is there a way to sort data, like from a sql query, so that a selected
column is alphabetized but the nulls or blank fields are listed last? Or
any idea how I would do this?

I have a query -- select lastname, firstname, address, county -- that I want
to sort by county and display in a datagrid, but those entries without a
county listed I do not want at the top of the list. Any easy way to do this
other than get a list of counties first, then query each county separately?

And if I were to run a separate query for each county, how would I attach
each result to the datagrid?

Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top