I have created a query that is causing an ordering problem. If I use the following SQL code:
SELECT tblCostarJobMaster.JobNumber, tblCostarJobMaster.JobName, tblCostarJobMaster.JobNotes
FROM tblCostarJobMaster
RIGHT JOIN tblSequence
ON tblCostarJobMaster.SchedSequence.Value = tblSequence.SequenceType
WHERE (((tblCostarJobMaster.JobType)="Closing"))
ORDER BY tblSequence.SequenceNumber, tblCostarJobMaster.SchedTime;
The query will sort correctly by the SequenceNumber field, but not the SchedTime field which holds time in the hh:mm format. However if I include the SchedTime field in the select statement, the query sorts correctly on both fields. Any thoughts on why this is occurring?
SELECT tblCostarJobMaster.JobNumber, tblCostarJobMaster.JobName, tblCostarJobMaster.JobNotes
FROM tblCostarJobMaster
RIGHT JOIN tblSequence
ON tblCostarJobMaster.SchedSequence.Value = tblSequence.SequenceType
WHERE (((tblCostarJobMaster.JobType)="Closing"))
ORDER BY tblSequence.SequenceNumber, tblCostarJobMaster.SchedTime;
The query will sort correctly by the SequenceNumber field, but not the SchedTime field which holds time in the hh:mm format. However if I include the SchedTime field in the select statement, the query sorts correctly on both fields. Any thoughts on why this is occurring?