Re: [sqlite] Displaying row count

2018-11-02 Thread E.Pasma
> R Smith: > > Simply add a column to any select like this: et voila... I tried without "partition by 1" and that works as well: "row_number() OVER ()" ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] Displaying row count

2018-10-31 Thread Nathan Green
My typical use case is trying to determine how many rows I just wrote out to a file. Window functions are no help because they alter the output format, which is usually undesirable. It's sort of absurd to run `wc -l` over the newest 25MiB file in my system to get an answer that's probably already

Re: [sqlite] Displaying row count

2018-10-31 Thread R Smith
On 2018/10/31 4:52 PM, David Fletcher wrote: Hi all, Is there a mode in the sqlite shell, or some fancy extension, that will display a row number when outputting results?  You know, something like this:     sqlite> .row on     sqlite> select * from SomeTable where ... ;     1. a|17|93|...    

Re: [sqlite] Displaying row count

2018-10-31 Thread Chris Locke
> that will display a row number when outputting results? Is this for your schema, or a 'general-could-be-anything' schema? If your own, any reason why you don't use the rowid or _rowid_ columns? They provide a unique reference for each row in a table. Thanks, Chris On Wed, Oct 31, 2018 at

Re: [sqlite] Displaying row count

2018-10-31 Thread Peter da Silva
If you're going to change the sqlite3 command shell, add a ".count" and maybe ".changes" display option. On Wed, Oct 31, 2018 at 11:23 AM Don V Nielsen wrote: > I really enjoy using JetBrains DataGrip. It connects to everything and has > great intellisense, find and replace tools, sql

Re: [sqlite] Displaying row count

2018-10-31 Thread Don V Nielsen
I really enjoy using JetBrains DataGrip. It connects to everything and has great intellisense, find and replace tools, sql templates, all the goodies a big IDE brings to the table. On Wed, Oct 31, 2018 at 11:05 AM Dominique Devienne wrote: > On Wed, Oct 31, 2018 at 3:55 PM Clemens Ladisch >

Re: [sqlite] Displaying row count

2018-10-31 Thread Dominique Devienne
On Wed, Oct 31, 2018 at 3:55 PM Clemens Ladisch wrote: > David Fletcher wrote:> Hi all, > > Is there a mode in the sqlite shell, or some fancy extension, that will > display a row > > number when outputting results? > > No. You'd have to modify the shell, or add the row_number() window >

[sqlite] Displaying row count

2018-10-31 Thread David Fletcher
Hi all, Is there a mode in the sqlite shell, or some fancy extension, that will display a row number when outputting results?  You know, something like this:     sqlite> .row on     sqlite> select * from SomeTable where ... ;     1. a|17|93|...     2. b|212|104|... I tend to use the sqlite

Re: [sqlite] Displaying row count

2018-10-31 Thread Clemens Ladisch
David Fletcher wrote:> Hi all, > Is there a mode in the sqlite shell, or some fancy extension, that will > display a row > number when outputting results? No. You'd have to modify the shell, or add the row_number() window function to the query. Regards, Clemens

[sqlite] Displaying row count

2018-10-31 Thread David Fletcher
Hi all, Is there a mode in the sqlite shell, or some fancy extension, that will display a row number when outputting results?  You know, something like this:     sqlite> .row on     sqlite> select * from SomeTable where ... ;     1. a|17|93|...     2. b|212|104|... I tend to use the sqlite