× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Unfortunately, you're trying to give us an example with all the names changed (to protect the innocent), so there are typo issues that make it difficult.  But if the date field is the first in the ORDER BY clause, then one of two things must have happened:

1. You are not putting that ORDER BY date in the subfile (you're putting some other value)
2. You are loading the subfile more than once (perhaps not clearing it)

ORDER BY is absolute.  The records will come to you in that sequence.  Put a breakpoint after the FETCH NEXT and prove to yourself that you are getting the records you think.


On 8/20/2019 9:07 AM, Jim Hawkins wrote:
I have results that look like this:
2019/03/25
2019/03/25
2019/03/25
2019/03/25
2019/03/25
2019/03/25
2019/03/25
2019/05/01
2019/05/01
2019/05/01
2019/03/26
2019/03/26
2019/03/26

When they are supposed to sorted by this date.

Luis, yes that was a typo.

I changed from an "inner join" to a simple "join" and that helped some, but I still getting results like above. My dates should be greater than 2019/08/15 however.

Steve, the example I was following (and I hate to introduce anything that may add issues) spelled out the files, maybe next time I will use the shorter qualifiers.

I will search for that join poster (just don't have a wall to post it on ☹ ).

Thanks everyone for the input on joining.

Regards,

Jim Hawkins
Programmer Analyst
Interkal LLC
Kalamazoo, MI



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.