Re: Query sort not working after NULL column
- From: "Michel Walsh" <vanderghastArobaseMsnDotCom@xxxxxxxxxx>
- Date: Mon, 10 Dec 2007 15:33:55 -0500
You order on Q (Q.SubTopic, Q.PkgID) but the two last selected fields are from C and A (C.Desc, A.Desc). Is that a typo or a shortcut you used to illustrate the problem?
Vanderghast, Access MVP
"mscertified" <rupert@xxxxxxxxxxxxx> wrote in message news:D42FB41B-9C7B-4E02-A96C-A8E6DB79B569@xxxxxxxxxxxxxxxx
Query:
SELECT Q.*, C.Desc AS ChapDesc, A.Desc AS ArtDesc
FROM (qryRpt5YrProgress7 AS Q LEFT JOIN tblChapters AS C ON CInt(Q.Chapter)
= CInt(C.Chapter)) LEFT JOIN tblArticles AS A ON (Q.Title = A.Title) AND
(Q.Chapter = A.Chapter) AND (Q.Article = A.Article)
ORDER BY Q.Title, Q.Chapter, Q.Article, Q.Topic, Q.SubTopic, Q.PkgID;
Sample output:
R9,22,2,17,Null,1867
R9,22,2,17,Null,1852
R9,22,2,17,Null,1852
R9,22,2,17,Null,1867
....
R9,22,2,17,Null,1885
R9,22,2,17,Null,1852
As you can see, last column is unsorted
"Jerry Whittle" wrote:
Does the data in column E have numbers in it that look something like street
addressses: 123 Main St? Numbers in text strings can seem to be sorted
incorrectly, but actually are not.
Provide some sample data where the sort isn't working right.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
"mscertified" wrote:
> I have a query that has an order by e.g.
> ORDER BY A,B,C,D,E
> For this particular subset of data, columns A, B and C are all the > same,
> column D is NULL in each row. However, column E has different values. > The
> sort is not sorting by column E. The only thing I can think of is the > NULLs
> in column D are throwing it off. Is this correct or should it sort > column E
> corectly even if column D is NULL.
>
> Hope someone can shed light on this?
.
- Follow-Ups:
- Re: Query sort not working after NULL column
- From: mscertified
- Re: Query sort not working after NULL column
- Prev by Date: Re: Message of the day pop-up?
- Next by Date: Re: Message of the day pop-up?
- Previous by thread: RE: Query sort not working after NULL column
- Next by thread: Re: Query sort not working after NULL column
- Index(es):
Relevant Pages
|