#>> #>> Date | Year | Month | Day #>> #>> 12/28/1988 1988 12 28 #>> 12/29/1988 1988 12 29 #>> 12/30/1988 1988 12 30 #>> 01/04/1988 1988 01 04 #>> 01/05/1988 1988 01 05 #>> 12/28/1989 1989 12 28 #>> 12/29/1989 1989 12 29 #>> 01/03/1989 1989 01 03 #>> 01/04/1989 1989 01 04 #>> 01/05/1989 1989 01 05 #>> #>> As you can see, the first set has a problem It goes from #>December 28, #>> 1988 to January 05, 1988, rather than January 05, 1989 #>like it should #>> for the first SET. #> #>Actually, it only seems this way due to the sorting order. If #>you just do "ORDER BY Year, Month, Day" you'll see what's #>going on. You have one set going from 12/28/87 to 01/05/88 #>(which just happens to be incomplete as you have no records #>in 1987), and another unrelated set going from 12/28/88 to #>01/05/89. Your overcomplicated ORDER BY clause causes these #>two sets to interleave.
This would then bring up another issue. Only COMPLETE SETS are needed, not partial ones. In another post, I stated adding "Date" to my ORDER BY so that at least the ORDER would be chronological. However, it still leaves the issue of the partial unwanted SET. > #>> I fugure the way to correct this issue is to make sure that each ROW #>> (record) has a DATE that is greater than the last ROW. #> #>So, just say that in ORDER BY. Is that what I did when I added "Date" to my ORDER BY? I'm assuming it is. But correct me if not. #> #>> Is it possible to have the SQL statement above do this as well? #> #>Yes. But then, lies the mystery. :-) Thanks. Rick #> #>Igor Tandetnik #> #> #>_______________________________________________ #>sqlite-users mailing list #>sqlite-users@sqlite.org #>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users #> #> _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users