[AccessD] Sort Blanks to the bottom

Andy Lacey andy at minstersystems.co.uk
Sun Nov 2 12:11:41 CST 2008


Neta, but would that not need to be Not Isnull(Class)? Or perhaps
IsNull(Class) DESC? Otherwise the Nulls (True, ie -1) would precede the Not
Nulls (False ie 0)

Andy

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Steve Schapel
Sent: 02 November 2008 17:54
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Sort Blanks to the bottom


Rocky,

A possible further simplification:

SELECT VarietyTBL.VarietyID, VarietyTBL.Class, VarietyTBL.Variety FROM
VarietyTBL ORDER BY IsNull(Class), VarietyTBL.Variety

Regards
Steve


Rocky Smolin at Beach Access Software wrote:
> Andy:
> 
> Very clever!  And works with only minor mods:
> 
> SELECT VarietyTBL.VarietyID, VarietyTBL.Class, VarietyTBL.Variety FROM 
> VarietyTBL ORDER BY IIf(IsNull(Class),2,1), VarietyTBL.Variety;
>  
-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list