Re: [sqlite] sqlite-users Digest, Vol 130, Issue 12

2018-10-12 Thread Balaji Ramanathan
>8. Re: sqlite-users Digest, Vol 130, Issue 11 (Shawn Wagner) > >On Thu, 11 Oct 2018 09:51:15 -0500, Balaji Ramanathan < > balaji.ramanat...@gmail.com> wrote: > >> > >>2. Re: SQLite mailing list > >> > > > > The 1990's called and they want their mailing lists back. So, let us > > switch

Re: [sqlite] Row value in predicate doesn't work

2018-10-12 Thread Lukas Eder
Following up, this also doesn't seem to be implemented: SELECT 1 WHERE (1, 1) IS NULL; I think this should be added for completeness' sake of the row value predicate functionality On Wed, Oct 10, 2018 at 3:42 PM Lukas Eder wrote: > According to my understanding of the SQL standard, the

[sqlite] Row value in predicate doesn't work

2018-10-12 Thread Lukas Eder
According to my understanding of the SQL standard, the following query should work, but doesn't on SQLite 3.25.2: SELECT 1 WHERE (1, 1) IN ((1, 1), (1, 2)); The error I'm getting (via xerial) is: SQL Error [1]: [SQLITE_ERROR] SQL error or missing database (row value misused) A workaround is

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread R Smith
On 2018/10/12 8:19 PM, Lars Frederiksen wrote: I type info into some labeledits and by pressing "Append to DB" button this code is executed (fdqGoser2 is a FDQuery) fdqGloser2.Open; fdqGloser2.Append; fdqGloser2.FieldByName('Graesk').AsString:= ledGræsk.Text;

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Lars Frederiksen
I type info into some labeledits and by pressing "Append to DB" button this code is executed (fdqGoser2 is a FDQuery) fdqGloser2.Open; fdqGloser2.Append; fdqGloser2.FieldByName('Graesk').AsString:= ledGræsk.Text; fdqGloser2.FieldByName('Dansk').AsString:= ledDansk.Text;

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Keith Medcalf
This would seem to imply that BitDefender is not the cause of your woes. Do you have write permission on the database file? --- The fact that there's a Highway to Hell but only a Stairway to Heaven says a lot about anticipated traffic volume. >-Original Message- >From: sqlite-users

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Stephen Chrzanowski
FSCK is File System ChecK, so the equivalent in Windows Scandisk. Trace through the code to find out when exactly the SQLite is reporting the lock. Is it at a query, on opening, is it multi-thread or multi-application access? Is the query taking too long? If you're debugging and everything is

Re: [sqlite] Replication

2018-10-12 Thread Keith Medcalf
>>> An SQL database is deemed "Relational" when it can communicate >>> mildly ... SQL stands for Structured Query Language. It has nothing whatsoever to do with the data store but rather is a specification of the Language used to retrieve/manipulate the datastore. This is the same as "C" or

Re: [sqlite] [EXTERNAL] Find key, value duplicates but with differing values

2018-10-12 Thread Dominique Devienne
On Thu, Oct 11, 2018 at 6:21 PM Hick Gunter wrote: > Two nested selects > The inner select groups by partId, name, value > The outer select groups by partId, name > Thank you who replied, Gunter, Ryan, Roman, David. This was simpler than I thought. I should have reflected a bit more myself :)

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Lars Frederiksen
Thank you for your response. To answer your questions: Ryan: It's sad to see someone get dismayed with what is usually a flawless working system. It's not the database that's tricky, it's the reason the file is locked. This would be a problem with a string based file too. - I agree Ryan, but I

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread E.Pasma
Clemens Ladisch wrote: > > John Found wrote: >> Also, it seems max(b = ?1) will do the trick as well as count(b = ?1) >> >> And here another question appears. What is more efficient? > > In SQLite, both are equally efficient. > > Use whatever makes the query easier to understand. Clemens, I

Re: [sqlite] SQLite mailing list [was: SQLite Windows GUI alternative to Excel?]

2018-10-12 Thread dmp
>> On Oct 9, 2018, at 7:19 PM, Warren Young wrote: >> >> The arguments about mailing lists vs forums have all been had. > It’s not clear why this entire conversation is presented in such stark terms: LIST > *OR* FORUM. Puzzling. > > If this is all driven by DRH edict that “all things shall run

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Chris Locke
> Database is locked Close your application. Is there a xxx-journal file in the same directory as the database? (where xxx is the name of the database) Try deleting this file. Thanks, Chris On Fri, Oct 12, 2018 at 4:54 PM Thomas Kurz wrote: > >> Could the problem arise due to filesystem

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Thomas Kurz
Could the problem arise due to filesystem corruption? Have you tried an fsck? - Original Message - From: R Smith To: sqlite-users@mailinglists.sqlite.org Sent: Friday, October 12, 2018, 17:35:28 Subject: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked On 2018/10/12

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread R Smith
On 2018/10/12 2:44 PM, Lars Frederiksen wrote: I have tried that too! - I must admit that right now I am turning to a KISS solution: String-based database with functions and procedures in a class that handles the different jobs you do on a table. After all these old-fashioned DB's are not so

Re: [sqlite] Replication

2018-10-12 Thread R Smith
Relational databases, and the Relational Model, are not so called because their records stand in relation to other records. The Model, and the subsequent databases, are about relations, which are a long-standing and precisely defined mathematical concept. So, I'm afraid, you are actually wrong

Re: [sqlite] Replication

2018-10-12 Thread Eric
On Fri, 12 Oct 2018 14:31:10 +0200, R Smith wrote: > > >> An SQL database is deemed "Relational" when it can communicate mildly > >> relational data using mildly relational (but mathematically sound) > >> methods. It doesn't need to be (nor claim to be) the Almighty keeper of > >> all

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Radovan Antloga
Try this: 1. check file atribute if it is not read only   maybe is not BitDefender 2. copy your database to some test database in   same folder. Try to edit with simple editor   and save that file to see if is possible. R.A. Lars Frederiksen je 12.10.2018 ob 14:23 napisal: I have tried this,

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Lars Frederiksen
I have tried that too! - I must admit that right now I am turning to a KISS solution: String-based database with functions and procedures in a class that handles the different jobs you do on a table. After all these old-fashioned DB's are not so picky :-) -Oprindelig meddelelse- Fra:

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Stephen Chrzanowski
How about moving the databases elsewhere? Sometimes applications are picky when it comes where files are being written to (IE: Program Files). On Fri, Oct 12, 2018 at 8:30 AM Lars Frederiksen wrote: > Setting the Busy Timeout (in FireDAC) to 5000 ms does not solve the > problem -

Re: [sqlite] Replication

2018-10-12 Thread R Smith
An SQL database is deemed "Relational" when it can communicate mildly relational data using mildly relational (but mathematically sound) methods. It doesn't need to be (nor claim to be) the Almighty keeper of all relationality, nor even simply conform to various specific interpretations of the

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Lars Frederiksen
Setting the Busy Timeout (in FireDAC) to 5000 ms does not solve the problem - unfortunately! -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Stephen Chrzanowski Sendt: 12. oktober 2018 14:25 Til: General Discussion of SQLite

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Lars Frederiksen
That is: I have disabled ALL protecting parameters in BitDefender to find the culprit module - without luck. -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Radovan Antloga Sendt: 12. oktober 2018 10:10 Til:

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Stephen Chrzanowski
Change the timeout value on the connection to 5 seconds or so. The DB will retry. The AV has its grip on it, doing a scan, and won't let anything else touch it until its done. On Fri, Oct 12, 2018 at 3:11 AM Lars Frederiksen wrote: > Hello, > > I have made (in Delphi) a program that writes to

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Lars Frederiksen
I have tried this, unfortunately without any luck. I think the problem might be in the sqlite DB-system. I have disabled ALL protecting parameters to find the culprit module - without luck. My sqlite version is: SQLite version 3.19.3 2017-06-08 14:26:16 There might be a newer and better version

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread Clemens Ladisch
John Found wrote: > Also, it seems max(b = ?1) will do the trick as well as count(b = ?1) > > And here another question appears. What is more efficient? In SQLite, both are equally efficient. Use whatever makes the query easier to understand. Regards, Clemens

Re: [sqlite] sqlite-users Digest, Vol 130, Issue 11

2018-10-12 Thread Petite Abeille
> On Oct 11, 2018, at 6:35 PM, Shawn Wagner wrote: > > I'm about ready to unsubscribe from this list and not come back until it > transitions to a forum (which is the interface I prefer anyways) because of > all this nattering clogging up my inbox the last few days. I thought I was > a grumpy

Re: [sqlite] SQLite mailing list [was: SQLite Windows GUI alternative to Excel?]

2018-10-12 Thread Petite Abeille
> On Oct 9, 2018, at 7:19 PM, Warren Young wrote: > > The arguments about mailing lists vs forums have all been had. It’s not clear why this entire conversation is presented in such stark terms: LIST *OR* FORUM. Puzzling. If this is all driven by DRH edict that “all things shall run on

Re: [sqlite] sqlite-users Digest, Vol 130, Issue 11

2018-10-12 Thread Petite Abeille
> On Oct 11, 2018, at 4:51 PM, Balaji Ramanathan > wrote: > > The 1990's called and they want their mailing lists back. It is/was there all the time. No one moved the cheese yet. (11) Every old idea will be proposed again with a different name and a different presentation, regardless of

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread R Smith
On 2018/10/12 7:38 AM, John Found wrote: The following code does not work, but gives an idea what I want to do: create table t (a, b); select group_concat(b) as list from t group by a having ?1 in (list); i.e. how to select only the groups that contain some

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread John Found
On Fri, 12 Oct 2018 11:12:17 +0200 Clemens Ladisch wrote: > I wrote: > > But you need to find some aggregate function that can do the filtering. > > HAVING SUM(b = ?1) > > (In a database with proper booleans: "HAVING SUM(CASE WHEN b = ? THEN 1 END) > > 0") Hey, this really looks great.

Re: [sqlite] Replication

2018-10-12 Thread Eric
On Thu, 11 Oct 2018 15:44:23 -0600, Warren Young wrote: > On Oct 11, 2018, at 2:25 PM, Eric wrote: >> >> On Thu, 11 Oct 2018 10:20:08 -0600, Warren Young wrote: >>> On Oct 11, 2018, at 12:26 AM, Darren Duncan wrote: >> 8>< >> This makes me think that it would be useful, if it

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread E.Pasma
> Op 12 okt. 2018, om 11:23 heeft Clemens Ladisch het > volgende geschreven: > > E.Pasma wrote: >> select group_concat(b) as list >> from t >> group by a >> having count(b=?1) >> ; > > In SQLite, a boolean expression returns 0 when false, and count(0) is 1. > You have to generate a NULL for

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread Clemens Ladisch
E.Pasma wrote: > select group_concat(b) as list > from t > group by a > having count(b=?1) > ; In SQLite, a boolean expression returns 0 when false, and count(0) is 1. You have to generate a NULL for failed matches, or use another function like sum() or max() that can filter out zeros. Regards,

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread E.Pasma
> John Found : > > The following code does not work, but gives an idea what I want to do: > >create table t (a, b); > >select > group_concat(b) as list >from t >group by a >having ?1 in (list); > > Clemens Ladisch : > > select >group_concat(b) as list >

Re: [sqlite] Replication

2018-10-12 Thread Eric
On Fri, 12 Oct 2018 00:06:38 +0200, R Smith wrote: > >> WARNING: the following sentence will be claimed to be controversial: >> >> No database based on SQL is truly relational. > > LOL - who would claim that to be controversial? > > It doesn't spur controversy... > > It's worthy of a shrug at

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread Clemens Ladisch
I wrote: > But you need to find some aggregate function that can do the filtering. HAVING SUM(b = ?1) (In a database with proper booleans: "HAVING SUM(CASE WHEN b = ? THEN 1 END) > 0") Regards, Clemens ___ sqlite-users mailing list

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread Clemens Ladisch
John Found wrote: > Clemens Ladisch wrote: >> select >> group_concat(b) as list >> from t >> where a in (select a >> from t >> where b = ?1) >> group by a; >> >> But you will not be able to avoid the subquery: the filter has to >> include all other rows of

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread Keith Medcalf
On Friday, 12 October, 2018 01:02, John Found wrote: >Hm, is sounds strange because when HAVING clause is processed, >the aggregate functions should not be processed yet (for a >performance reasons) i.e. the query still has access to all >values from the field >b >and theoretically should be

Re: [sqlite] Replication

2018-10-12 Thread Eric
On Thu, 11 Oct 2018 16:56:21 -0700, David Barrett wrote: > Incidentally, Bedrock is built on a blockchain as well -- though I agree > with the sentiment that blockchain isn't actually new at all, and not that > big of a deal. More information is here: > http://bedrockdb.com/blockchain.html

Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Radovan Antloga
Try to change database name (extension). For example: mydb.sqlite mydb.sdb mydb.db3 I would use .sqlite extension and exclude that files from antivirus check. Regards Lars Frederiksen je 12.10.2018 ob 9:11 napisal: Hello, I have made (in Delphi) a program that writes to a sqlite database.

[sqlite] error message: [FireDAC][Phys][SQLite] Database is locked

2018-10-12 Thread Lars Frederiksen
Hello, I have made (in Delphi) a program that writes to a sqlite database. This is a simple stand-alone solution. Now something is blocking for the programs attempt to writing to the databse. There is a an error message: [FireDAC][Phys][SQLite] Database is locked. A friend of mine has analysed

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread John Found
On Fri, 12 Oct 2018 08:27:10 +0200 Clemens Ladisch wrote: > John Found wrote: > > i.e. how to select only the groups that contain > > some value in the set of values in a column not > > specified in group by clause. > > > > select > > (select group_concat(b) from t t1 where t1.a =

Re: [sqlite] Filtering groups by non-grouped field.

2018-10-12 Thread Clemens Ladisch
John Found wrote: > i.e. how to select only the groups that contain > some value in the set of values in a column not > specified in group by clause. > > select > (select group_concat(b) from t t1 where t1.a = t2.a) as list > from t t2 > where b = ?1; Similarly: select