Re: [sqlite] SQL question, move union to second column

2019-03-13 Thread Bart Smissaert
Ah, yes, thanks. RBS On Thu, Mar 14, 2019 at 12:55 AM Igor Tandetnik wrote: > On 3/13/2019 8:32 PM, Bart Smissaert wrote: > > Sorry, ignore that, can see now that all is a reserved word. > > You can enclose it in double quotes, as in "All", if you really want it. > -- > Igor Tandetnik > > >

Re: [sqlite] SQL question, move union to second column

2019-03-13 Thread Igor Tandetnik
On 3/13/2019 8:32 PM, Bart Smissaert wrote: Sorry, ignore that, can see now that all is a reserved word. You can enclose it in double quotes, as in "All", if you really want it. -- Igor Tandetnik ___ sqlite-users mailing list

Re: [sqlite] SQL question, move union to second column

2019-03-13 Thread Bart Smissaert
Sorry, ignore that, can see now that all is a reserved word. RBS On Thu, Mar 14, 2019 at 12:30 AM Bart Smissaert wrote: > Thanks; this works fine: > > select PLACE, > sum(ID not in (select ID from ATTENDED)), > count(ID) > from PERSONS group by PLACE > > But if I add the aliases I

Re: [sqlite] SQL question, move union to second column

2019-03-13 Thread Bart Smissaert
Thanks; this works fine: select PLACE, sum(ID not in (select ID from ATTENDED)), count(ID) from PERSONS group by PLACE But if I add the aliases I get: near "All": syntax error Result of sqlite3_prepare16_v3: 1 select PLACE, sum(ID not in (select ID from ATTENDED)) Not_Attended,

Re: [sqlite] SQL question, move union to second column

2019-03-13 Thread Igor Tandetnik
On 3/13/2019 8:08 PM, Bart Smissaert wrote: But I would like the result to be in 3 columns, so result in this case would be: Place Not_Attended All --- A 3 7 B 2 3 Something like this (not tested): select

Re: [sqlite] Is it possible to use sqlite online-backup system in an ongoing manner?

2019-03-13 Thread Barry Smith
I think the sessions extension can be used for what you want to do. I haven't used it myself, but from it's documented behaviour it looks like you could record change sets for every three second interval then apply them back to your database on disk. If your app is multi-threaded it might be a

[sqlite] SQL question, move union to second column

2019-03-13 Thread Bart Smissaert
Have 2 tables: PERSONS: CREATE TABLE [PERSONS]([ID] INTEGER PRIMARY KEY, [Place] TEXT) ATTENDED: CREATE TABLE [ATTENDED]([ID] INTEGER) Sample date like this: PERSONS: ID Place --- 1 A 2 A 3 B 4 A 5 A 6 A 7 B 8 B 9 A 10 A ATTENDED: ID - 1 5 6 1 1 8 9 5 1 5 8 1 6 8 9 9 1 5 6 1

[sqlite] Typo - https://www.sqlite.org/see/doc/trunk/www/index.wiki

2019-03-13 Thread Chris Locke
On the page https://www.sqlite.org/see/doc/trunk/www/index.wiki in the 'key links' section, there is a link to 'Files in the lastest release of SEE'. This should be 'latest' and not 'lastest'. Thanks, Chris ___ sqlite-users mailing list

Re: [sqlite] SEE

2019-03-13 Thread Simon Slavin
On 13 Mar 2019, at 10:50pm, Williams, Kevin wrote: > Any articles out there giving some hint how we use the SEE version of SQLite > we compiled with our C# program that references System.Data.SQLite? Try this: and come back if you have

[sqlite] SEE

2019-03-13 Thread Williams, Kevin
Any articles out there giving some hint how we use the SEE version of SQLite we compiled with our C# program that references System.Data.SQLite? Thanks in advance! Kevin ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

[sqlite] sqlite3_db_filename returns an empty string when null pointer is promised

2019-03-13 Thread Alex Alabuzhev
Hi, https://www.sqlite.org/c3ref/db_filename.html: > If there is no attached database N on the database connection D, or if database N is a temporary or in-memory database, then a NULL pointer is returned. However, when called for :memory: db the function actually returns "". Looking at the

[sqlite] Developer questions about the Online Backup API

2019-03-13 Thread Simon Slavin
If the source database is changed while the Online Backup API is running, it returns to the beginning of the database and starts again. I have a couple of questions which might be useful, especially if the database is changed only by the same connection as it performing the backup. There's a

Re: [sqlite] Is it possible to use sqlite online-backup system in an ongoing manner?

2019-03-13 Thread Simon Slavin
On 13 Mar 2019, at 2:31pm, John Smith wrote: > I am working with IN-MEMORY database. > When my program starts I load data from file-system DB into my IN-MEMORY DB. > All other SQL operations are performed directly on my IN-MEMORY database. > This is in order to keep performance high. First,

[sqlite] Is it possible to use sqlite online-backup system in an ongoing manner?

2019-03-13 Thread John Smith
I am working with IN-MEMORY database. When my program starts I load data from file-system DB into my IN-MEMORY DB. All other SQL operations are performed directly on my IN-MEMORY database. This is in order to keep performance high. However, I have a requirement that my original file-system

Re: [sqlite] [EXTERNAL] Re: Apparent power fail data loss in embedded use - SQLite newbie

2019-03-13 Thread Hick Gunter
If the original author bothered to set TEMP_STORE to "always memory", I would take that as a strong indication that they are using TEMP tables for performance reasons. Off the top of my head I would probably do: CREATE TABLE log (id integer primary key, timestamp integer, data_item_1 float,