-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Allen Fowler wrote: > What am I missing here? Am I doing the query wrong?
It would take a considerable number of iterations to help get the queries exactly correct, especially as there are lots of details as you note such as sort order etc :-) I'd recommend continuing down the path you are exploring which is having test data and tweaking/tuning/correcting your queries until they are acceptable. You'll probably find it easier to write the processing algorithm in the programming language of your choice. This will allow you to print out diagnostics as you go along, play with a debugger etc. To make it easy to map back to SQL you should structure it as a for loop over the rows of data with inclusion/exclusion conditions at the top of the loop. If you decide to express it in SQL again you can then run your correct language code against SQL and compare the results as your test framework. (Strictly speaking you are already doing this but the programming language is your brain :-) Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkoywAAACgkQmOOfHg372QQtRgCgwXukh19LMNZmgW/PlNWtIykM rVYAnA+kcTHJVEfVzXcl/kev2PlKW7vR =TySB -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users