Re: [sqlite] curious discovery about geopoly module

2018-10-31 Thread Graham Hardman
Hi, and thanks for the suggestion. I am familiar with the vbRichClient solution. There are also odbc drivers that are free to use but in the end I am looking for system that has to work as 64 bit inside 64-bit Autocad where vba runs in-process. The system that I am using seems ideal in that

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] forming sqlite3_statements using stored sql

2018-10-31 Thread David Fletcher
Hi all, In a web-based application I developed, I have a table that holds SQL for various statement used in the application.  It's simple and looks something like this:     create table if not exists StmtSQL (         StmtName        TEXT NOT NULL UNIQUE,         SQL                  TEXT NOT

[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

[sqlite] Sqlite intarray issue

2018-10-31 Thread Roman Ivasyshyn
Hello sqlite team, I faced with an issue of creating int array with the same name without closing connection. I use sqlite3_intarray_create to create int array on a second call I receive SQLITE_MISUSE error. What I found inside create function that it tries to create module that already exist

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

Re: [sqlite] Sqlite intarray issue

2018-10-31 Thread Richard Hipp
On 10/31/18, Roman Ivasyshyn wrote: > > I faced with an issue of creating int array with the same name without > closing connection. That is not allowed. But you can use sqlite3_intarray_bind() to change the array to which the intarray table is bound, or the length of the array. Another option

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 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 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 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] Optmize queries on ranges

2018-10-31 Thread Jens Alfke
> On Oct 25, 2018, at 10:45 AM, Keith Medcalf wrote: > > There is an extra column load and compare when using the between version of > the query (this is because although the optimization of the index use is the > same, the use of x BETWEEN y AND z adds both the y <= x and x <= z checks as

[sqlite] use column alias in same SELECT

2018-10-31 Thread Thomas Kurz
Dear all, may I ask whether there is a deeper reason why using a column alias in the same SELECT query doesn't work, e.g. SELECT column1 AS a, 5*column2 AS b, a+b FROM... This is not an SQlite issue, it doesn't work in MariaDB either. It would, however, be very handy if it worked.

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] use column alias in same SELECT

2018-10-31 Thread Simon Slavin
On 31 Oct 2018, at 7:14pm, Thomas Kurz wrote: > may I ask whether there is a deeper reason why using a column alias in the > same SELECT query doesn't work, e.g. > > SELECT column1 AS a, 5*column2 AS b, a+b FROM... The canonical answer to this is that there's nothing in the SQL

Re: [sqlite] use column alias in same SELECT

2018-10-31 Thread R Smith
On 2018/10/31 9:21 PM, Simon Slavin wrote: On 31 Oct 2018, at 7:14pm, Thomas Kurz wrote: may I ask whether there is a deeper reason why using a column alias in the same SELECT query doesn't work, e.g. SELECT column1 AS a, 5*column2 AS b, a+b FROM... The canonical answer to this is

Re: [sqlite] SQLite for datalogging - best practices

2018-10-31 Thread Gerlando Falauto
Hi Keith, first of all let me tell you I cannot thank you enough for going through all this trouble for me! It did not occur to me it would help to run checkpoints manually. There's a couple of things I don't understand though. - After a checkpoint runs to completion (assuming no other process

Re: [sqlite] use column alias in same SELECT

2018-10-31 Thread Thomas Kurz
Thank you very much for the detailed answer. I now understand things better and can better accept that they are how they are :-)) - Original Message - From: R Smith To: sqlite-users@mailinglists.sqlite.org Sent: Wednesday, October 31, 2018, 21:34:30 Subject: [sqlite] use column alias

Re: [sqlite] SQLite for datalogging - best practices

2018-10-31 Thread Keith Medcalf
On Wednesday, 31 October, 2018 13:22, Gerlando Falauto wrote: >first of all let me tell you I cannot thank you enough for going >through all this trouble for me! No problem. I still really do not know if the answer is correct however it does let you get data about how much data is actually

Re: [sqlite] Bug: float granularity breaking unique contraint?

2018-10-31 Thread Bernardo Sulzbach
It is not a bug AFAIK. SQLite uses what the documentation calls dynamic typing for its actual values. So if you are inserting integers into a real column, you are going to store integers. However, when you select from it they are presented as reals and mix up (looking as if there were duplicates,

[sqlite] Bug: float granularity breaking unique contraint?

2018-10-31 Thread szmate1618
Dear SQLite people, Please bless me with your infinite wisdom. I'm using SQLite 3.25.2 on Windows, downloaded the latest precompiled binaries from the official page https://sqlite.org/download.htmlExecuting the following code DROP TABLE IF EXISTS TestReal;CREATE TABLE TestReal(A REAL

Re: [sqlite] curious discovery about geopoly module

2018-10-31 Thread Graham Holden
> There are, of course, multiple apps on my system that use sqlite3.dll - > including the Bricscad app that I am running my vba code from.Speculating > somewhat: Have you tried updating the copy Briscad is using? If one version > is already in memory, you _may_ have problems persuading Windows

Re: [sqlite] curious discovery about geopoly module

2018-10-31 Thread Dominique Devienne
On Wed, Oct 31, 2018 at 12:51 PM Graham Holden wrote: > > There are, of course, multiple apps on my system that use sqlite3.dll - > including the Bricscad app that I am running my vba code from.Speculating > somewhat: Have you tried updating the copy Briscad is using? If one version > is already

Re: [sqlite] Database identified as zip

2018-10-31 Thread Dingyuan Wang
It opens correctly now. 2018-10-30 22:37, Richard Hipp: > On 10/30/18, Dingyuan Wang wrote: >> >> Is this considered a bug? > > Should be fixed on trunk, now. > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] curious discovery about geopoly module

2018-10-31 Thread Graham Hardman
Hi Richard, I have discovered that there is a problem in that the vba code (I got from the github site) is somehow failing to load my custom library from my specified location and in fact keeps referencing a file with version 3.8.5 from 2014. I am not sure how to overcome this right now apart