Re: Unwanted alphanumeric sort on time, incorrect min/max value
- From: Jelle <Jelle@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 10 Jun 2008 05:09:01 -0700
Bob,
hereby the code:
SELECT tblMAHIS_WO.ID, tblMAHIS_WO.UNIQUE_KEY,
IIf([ORDER_ID]<>"",[ORder_id],[id]) AS [ORDER], tblMAHIS_WO.[Assignment
aanmaak], tblMAHIS_WO.[Assignment gereed], tblMAHIS_WO.Van, tblMAHIS_WO.Naar,
tblMAHIS_WO.ASSIGNMENT_ID, tblMAHIS_WO.TU_ID
FROM tblMAHIS_WO
WHERE (((tblMAHIS_WO.Naar)="WO_COMPL_PAL"))
ORDER BY IIf([ORDER_ID]<>"",[ORder_id],[id]), tblMAHIS_WO.[Assignment gereed];
The iff-clause is to ensure uniqueness for those records that do not belong
to an order. I assume this should not be the problem ast the sort within the
order is the issue.
Thx, Jelle
"Bob Barrows [MVP]" wrote:
Jelle wrote:.
LS,
query below is sorted on order and date ascending.
Actually, what I see below is what I assume to be the result of running a
query. It is not the query itself. So ...
Please show us the sql of the query being used to generate this data (you
can clip out the parts we don't need to see - it's the ORDER BY clause i am
interested in). To see the sql, open your query in Design mode, then switch
to SQL View using the View menu or the toolbar button (you can also switch
using the right-click context menu)
The date fields
are, as far as I know real date fields,
"as far as I know"?
I'm not clear why there would be any doubt in your mind, which leads to my
next question:
Is this a local table in your mdb file? or a remote, linked table from
another database? If it is a remote table, please tell us the type and
version of the remote database, as well as the exact data types of the
fields involved. Actually, even if it is a local table, you should open the
table in Design mode and look at the data types (I'm not interested in the
format) of those "date" fields and let us know what they are, for sure.
still, the sort appears to beI will let you know when you have provided the extra information.
alphanumeric, which screws up a min max on the query as well.
Any suggestions??
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
- Follow-Ups:
- Re: Unwanted alphanumeric sort on time, incorrect min/max value
- From: Bob Barrows [MVP]
- Re: Unwanted alphanumeric sort on time, incorrect min/max value
- References:
- Re: Unwanted alphanumeric sort on time, incorrect min/max value
- From: Bob Barrows [MVP]
- Re: Unwanted alphanumeric sort on time, incorrect min/max value
- Prev by Date: Re: 2 complicated queries
- Next by Date: RE: Using Multiple Combo Boxes as Criteria for Query
- Previous by thread: Re: Unwanted alphanumeric sort on time, incorrect min/max value
- Next by thread: Re: Unwanted alphanumeric sort on time, incorrect min/max value
- Index(es):
Relevant Pages
|