n names in the source table take precedence over
result column name, or should it be the other way around?
Any insights are appreciated. Please advise if a different mailing list
would be more appropriate for this question.
--
D. Richard Hipp
d...@sqlite.org
On Wed, Aug 14, 2013 at 2:28 PM, Scott Marlowe wrote:
> On Wed, Aug 14, 2013 at 12:01 PM, Richard Hipp wrote:
>
> substr(m,2) as m
>
> is bad form. Always use a new and unique alias, like m1. How does this
> work:
>
> SELECT '2', substr(m,2) AS m1
> FROM
RT INTO t1 VALUES('az');
INSERT INTO t1 VALUES('by');
INSERT INTO t1 VALUES('cx');
SELECT '1', substr(m,2) AS m FROM t1 ORDER BY m;
SELECT '2', substr(m,2) AS m FROM t1 ORDER BY m COLLATE "POSIX";
If that is n