473,325 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Sorting data before displaying

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.
Nov 18 '05 #1
0 1058

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ross | last post by:
The following codes originally provided by a kind responder Toby A Inkster in another newsgroup for working on displaying a table on web capable of sorting are modified by me (a newbie). How to...
2
by: DelphiBlue | last post by:
I have a Nested Datagrid that is using a data relations to tie the parent child datagrids together. All is working well with the display but I am having some issues trying to sort the child...
2
by: Alan Searle | last post by:
I find that I can display structured data very nicely using XML with an XSL template. As an extra 'goodie', I would like to give users the ability to sort that data (for example with a button...
0
by: Maran | last post by:
We have come across a situation that I thinks not many have. Grateful for all responses. Regards Maran ************* * Scenario A DataList binds to a DataRow, with "RegionName" och...
3
by: amit.vasu | last post by:
Hi I have a datagridview control which I am binding to a datatable. Before binding to a datatable I am adding one row in the datatable for Total and populating data in that row at runtime. ...
0
by: Chris Botha | last post by:
Using VS2005, on the form is a DataGridView, a typed DataSet containing the data and a BindingSource between the grid and the dataset. One of the columns is a DataGridViewComboBoxColumn, doing what...
1
by: Nate | last post by:
I have a GridView with one sort column. When I click the sort column the first time nothing happens. After that when I click the sort column the sort order changes and my grid is updated as...
10
by: Sjaakie | last post by:
Hi, I'm, what it turns out to be, fooling around with 3-tier design. At several websites people get really enthusiastic about using custom dataobjects instead of datasets/-tables. While trying to...
1
by: aspxkid | last post by:
My requirement is displaying the records in the grid sorted on a "description" column.i am doing a order by for this column in the sql SP itself.The user can sort any columns once the grid is...
1
KevinADC
by: KevinADC | last post by:
Introduction In part one we discussed the default sort function. In part two we will discuss more advanced techniques you can use to sort data. Some of the techniques might introduce unfamiliar...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.