Re: Incorrect sort results within query



To display all the columns is too much. It becomes very hard to read in the
amount of space provided. In the previous email, I was just showing the last
few columns which are the ones having problems.

The date does not have a time reference. Even if it did, it is at the end
of the sort. The 'AAAA' language sort value should still appear before the
'Lithuanian' value.

I am working on getting a html version outside our firewall so you can see
the data more clearly.

Thanks.

Kathy

"Duane Hookom" wrote:

Your sample data doesn't seem to display the columns used to sort. Does the
Reference Date field contain a time element?

You can't attach files to messages in these news groups. You could create an
image file or other information on another web page and provide a link. It is
generally advisable to type or copy and paste records into the body of your
reply.
--
Duane Hookom
Microsoft Access MVP


"KathyW" wrote:

Jeff,

Thanks for responding.

Here are a few columns from the query results Reference Date, Reference ID
and Langauage Sort The following rows are displayed...

Reference Date Reference ID LanguageSort
10/9/2007 21401 Lithuanian
10/9/2007 21401 AAAA
10/15/2007 21404 AAAA
10/15/2007 21404 Lithuanian

Rows 1 & 2 are out of order. Rows 3 & 4 are correct.

I copied the data into a little spread*** to show you. You probably need
to see more than just the columns displayed above. How do I attach the file?
Thanks.

"Jeff Boyce" wrote:

It all starts with the data...

Please provide an example of the data that you have in that "6th" field, how
you'd expect it to sort, and how it is sorting...

Regards

Jeff Boyce
Microsoft Office/Access MVP

"KathyW" <KathyW@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:07D2DC0B-6688-4826-8DE2-D4923B606673@xxxxxxxxxxxxxxxx
Is there a limit of the number of sort items one can have within a query.
We
are using MS Access 2002. I am using the following query but getting
incorrect sort results. The 6th sort item is not sorting correctly. See
query below...

SELECT [regulation parents].*, [pseudo countries].[Region name]
FROM [pseudo countries] RIGHT JOIN [regulation parents] ON ([pseudo
countries].CountryCode = [regulation parents].CountryCode) AND ([pseudo
countries].RegionCode = [regulation parents].RegionCode)
WHERE ((([regulation parents].RegulationType)>0) AND (([regulation
parents].RegID)=21401) AND (([regulation parents].CountryCode)="lt")) OR
((([regulation parents].RegID)=23426) AND (([regulation
parents].CountryCode)="lt")) OR ((([regulation parents].RegID)=21404) AND
(([regulation parents].CountryCode)="lt")) OR ((([regulation
parents].RegID)=21406) AND (([regulation parents].CountryCode)="lt"))
ORDER BY [regulation parents].HeadingName,
[regulation parents].RegulationType,
[pseudo countries].[Region name],
[regulation parents].SortTitle,
[regulation parents].RegID,
[regulation parents].LanguageSort,
[regulation parents].ReferenceDate DESC;

Thanks.

Kathy



.