15, 2017 4:31 PM
To: SQLite mailing list
Subject: [sqlite] Documentation of valid ORDER BY terms after UNION?
I've read "The ORDER BY clause" of [1] and I *think* that the following
is what I am running into:
"However, if the SELECT is a compound SELECT, then ORDER BY
expr
On Mon May 15, 2017 at 09:58:31PM +0100, Simon Slavin wrote:
>
> On 15 May 2017, at 9:30pm, no...@null.net wrote:
>
> >SELECT
> >1 AS col
> >UNION ALL
> >SELECT
> >0 AS col
> >ORDER BY
> >col > 0 DESC;
>
> Out of interest, intuitively rather than reading
On 15 May 2017, at 9:30pm, no...@null.net wrote:
>SELECT
>1 AS col
>UNION ALL
>SELECT
>0 AS col
>ORDER BY
>col > 0 DESC;
Out of interest, intuitively rather than reading documentation, which do you
think should be done first ? Should SQL do both SELECTs
This works:
SELECT
1 AS col
ORDER BY
col > 0 DESC;
The following fails with "Error: 1st ORDER BY term does not match any
column in the result set."
SELECT
1 AS col
UNION ALL
SELECT
0 AS col
ORDER BY
col > 0 DESC;
I've read "The
4 matches
Mail list logo