|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Sorting ascending ignoring null values
Can you make a query ignore null values when you sort in ascending order?
I want to sort a list by number and only about 10 values have numbers assigned, the others are null. I want the whole list displayed, and I want the numbers in descending order from top to bottom. However, every time I do this, the null values appear up the top and I have to scroll to the bottom. Can I make those null values appear after the other values? Thanks in advance. |
|
#2
|
||||
|
||||
|
You can use the nz(fieldname,0) to return zerovalues for null value fields and then use the descending order,
Ex. select nz(fieldname,0) from table order by nz(fieldname,0) asc you can replace 0 with any value depending upon your requirement of sort order
__________________
V.Subramanian |
|
#3
|
|||
|
|||
|
Quote:
Thanks. I had originally set them all to 99 and made the default value of 99. But your suggestion works just as well. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft Access Help > Sorting ascending ignoring null values |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|