Thanks to all for the input. To clarify, yes the ORDER BY clause is in the view definition and the SELECT statement that addresses the view does not have an ORDER BY clause.
I think the penny has finally dropped for me on this issue. The key was the description by a responder that views are not macros, they are tables and you can't specify an ORDER BY clause when creating a table. I still don't fully understand why all this appeared to work OK in SQLite, but not in mySQL Maybe some difference in the way the query planner works in each implementation I do think that If ORDER BY is not allowed in views, or has no effect, an error should be flagged when creating a view that includes it. Once again, thanks for all the input, I will proceed accordingly. Pete _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users