On 27/04/2022 17:37, Bryan Pendleton wrote:
> There is no natural order for rows in SQL. If you care about the order
> of the rows in your result, you must always specify an ORDER BY
> clause.
Well, the "default" ordering (no ORDER BY clause) reflects the order of
insertion. It seems odd to me that sorting by one of the columns should
reverse the sort order of another column.
> Instead of putting the ORDER BY in the definition of the view, put the
> ORDER BY on the SELECT statement from the view.
Except I can't, as the ORDER BY in the SELECT is automagically created
by the method which generates the HTML, based on the user's choice of
column and sort order at any given moment. (Howvwer, I only tried
putting ORDERBY in theview to see if it made any difference, and have
removed it when I found it didn't.
So it seems I'm stuck with everything coming out in reverse alphabetical
order if I sort on column 1.
--
John English
--
This email has been checked for viruses by AVG.
https://www.avg.com