Re: [sqlite] i Know i should use 'AS', but ....

2018-12-26 Thread Luuk
On 26-12-2018 08:20, Clemens Ladisch wrote: Luuk wrote: sqlite> .mode column sqlite> .headers on sqlite> select 1 as X,date() as d union all select 2,date() union all select 3,datetime(); X   d --  -- 1   2018-12-25 2   2018-12-25 3   2018-12-25

Re: [sqlite] i Know i should use 'AS', but ....

2018-12-25 Thread Clemens Ladisch
Luuk wrote: >sqlite> .mode column >sqlite> .headers on >sqlite> select 1 as X,date() as d union all select 2,date() union all >select 3,datetime(); >X   d >--  -- >1   2018-12-25 >2   2018-12-25 >3   2018-12-25 The value is longer than the column wi

Re: [sqlite] i Know i should use 'AS', but ....

2018-12-24 Thread Peter Johnson
The headers are present in all three queries you pasted. The first result shows two rows, the top row is the header. The other two results show 4 rows each, the top row of each is the header row. -P On Tue, 25 Dec 2018, 3:42 AM Luuk sqlite> .version > SQLite 3.26.0 > > sqlite> .headers on > >

[sqlite] i Know i should use 'AS', but ....

2018-12-24 Thread Luuk
sqlite> .version SQLite 3.26.0 sqlite> .headers on sqlite> select 1 as X,date(); X|date() 1|2018-12-24 sqlite> select x,row_number() over (order by 1 desc) from (select 1 as x union all select 2 union all select 3); x|row_number() over (order by 1 desc) 3|1 2|2 1|3 Why are the headers missing