Re: [sqlite] LIKE IN

2019-11-23 Thread Gert Van Assche
I think this will work: INSERT INTO queries VALUES ('Alex'); INSERT INTO queries VALUES ('Rob'); select * from names where exists ( select query from queries where names.name like '%'||query||'%' ); On Fri, 22 Nov 2019 at 15:19, David Raymond wrote: > Or alternatively something like:

Re: [sqlite] Concurrency Question

2019-11-23 Thread Dan Kennedy
On 23/11/62 17:02, Mario M. Westphal wrote: I have an issue with concurrency. This may be the intended behavior of SQLite. Or I'm doing something wrong. If somebody could shed a light, I would be thankful. I compile and use SQLite on Windows with VStudio. I compile it with

[sqlite] Shell commands for controlling headers

2019-11-23 Thread Craig H Maynard
All, Could someone clarify the difference between the two sqlite3 shell commands .header and .headers? The relevant documentation page: https://www.sqlite.org/cli.html On this page, .header is discussed in section 5 but does not appear in Section 3. Thanks, Craig -- Craig H Maynard Rhode

Re: [sqlite] Shell commands for controlling headers

2019-11-23 Thread Richard Hipp
On 11/23/19, Craig H Maynard wrote: > All, > > Could someone clarify the difference between the two sqlite3 shell commands > .header and .headers? > > The relevant documentation page: https://www.sqlite.org/cli.html > > On this page, .header is discussed in section 5 but does not appear in >

[sqlite] Concurrency Question

2019-11-23 Thread Mario M. Westphal
I have an issue with concurrency. This may be the intended behavior of SQLite. Or I'm doing something wrong. If somebody could shed a light, I would be thankful. I compile and use SQLite on Windows with VStudio. I compile it with SQLITE_THREADSAFE=1 At runtime, I use sqlite3_open_v2 () and

Re: [sqlite] LIKE IN

2019-11-23 Thread Gert Van Assche
Both queries will work like this: DROP TABLE names; CREATE TABLE names (name TEXT); INSERT INTO names VALUES ('Alex'); INSERT INTO names VALUES ('Alexander'); INSERT INTO names VALUES ('Alexandra'); INSERT INTO names VALUES ('Rob'); INSERT INTO names VALUES ('Rhobin'); -- should not match INSERT

Re: [sqlite] What is the C language standard to which sqlite conforms ?

2019-11-23 Thread Dan Kennedy
Some follow up and thank you all for looking at this. Using this mornings trunk/current/head I do see the tests running well  with these little exceptions : boe13$ pwd /opt/bw/build/sqlite_20191121213415_rhel_74_3.10.0-693.el7.x86_64.006 ... build clean as usual :-) tests run nicely now

[sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Dennis Clarke
I may be the only person that does this sort of testing for my own reasons and perhaps for sanity checking also. I tend to think that if something is written to be compliant with C89/C90 then I should be able to run the most strict compliance compiler flags in creation and be perfectly happy.

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Simon Slavin
On 23 Nov 2019, at 11:06pm, Richard Hipp wrote: > given the choice between > > (1) Code that works and does something useful > (2) Code that is standards compliant > > I'll always go with (1). Another problem is that different compilers, or the same compiler with different options, warn

Re: [sqlite] What is the C language standard to which sqlite conforms ?

2019-11-23 Thread Dennis Clarke
On 11/23/19 4:46 PM, Dan Kennedy wrote: Some follow up and thank you all for looking at this. Using this mornings trunk/current/head I do see the tests running well  with these little exceptions : boe13$ pwd /opt/bw/build/sqlite_20191121213415_rhel_74_3.10.0-693.el7.x86_64.006 ... build

Re: [sqlite] Concurrency Question

2019-11-23 Thread Mario M. Westphal
That's very helpful, thank you very much, Daniel. Also to Jens. I've re-read the SQLite documentation for shared cache now. I guess I had enabled it in the past to increase the performance (many threads in my application). Apparently, this had the opposite effect :-/ After disabling the

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Peter da Silva
Strictly compliant code strictly doesn't need to do anything at all, conforming to strict standards instead of what compilers actually do is an interesting intellectual exercise but is not necessarily useful. On Sat, Nov 23, 2019, 16:27 Dennis Clarke wrote: > > I may be the only person that

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Jan Nijtmans
Op za 23 nov. 2019 om 23:27 schreef Dennis Clarke: > /usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.005/src/tclsqlite.c: > "/usr/local/build/sqlite-src-3300100_Oracle_sparc64vii+.005/src/tclsqlite.c", > line 2624: warning: argument #3 is incompatible with prototype: > prototype:

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Dennis Clarke
On 11/23/19 11:06 PM, Richard Hipp wrote: conforming to strict standards instead of what compilers actually do My problem here is that the compilers and their ability to comply with those wonderful cross platform standards is always a moving picture. Regardless it may be of some value to put

Re: [sqlite] Concurrency Question

2019-11-23 Thread Jens Alfke
> On Nov 23, 2019, at 7:17 AM, Dan Kennedy wrote: > > This should only happen if you are using shared-cache mode. Don't use > shared-cache mode. Shared-cache mode also breaks Isolation between connections — during a transaction, other connections will see the writer’s intermediate state.

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Richard Hipp
On 11/23/19, Peter da Silva wrote: > Strictly compliant code strictly doesn't need to do anything at all, > conforming to strict standards instead of what compilers actually do is an > interesting intellectual exercise but is not necessarily useful. Right. So given the choice between (1) Code

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Richard Damon
On 11/23/19 6:35 PM, Simon Slavin wrote: > On 23 Nov 2019, at 11:06pm, Richard Hipp wrote: > >> given the choice between >> >> (1) Code that works and does something useful >> (2) Code that is standards compliant >> >> I'll always go with (1). > Another problem is that different compilers, or the

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Dennis Clarke
1 - I was taught C by kre back in 1982 (or was it 1983?), on a VAX called "munnari," for those who remember their history  :-> I remember you however I started on BSD implementaions in 83 or 84 with the first real big workstations I had being the Apollo DN1000 and DN3000 boxen. Those things

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Dennis Clarke
On 11/23/19 11:35 PM, Simon Slavin wrote: On 23 Nov 2019, at 11:06pm, Richard Hipp wrote: given the choice between (1) Code that works and does something useful (2) Code that is standards compliant I'll always go with (1). Another problem is that different compilers, or the same compiler

Re: [sqlite] Regarding the whole C89/C90 language compliance debacle ...

2019-11-23 Thread Gary R. Schmidt
On 24/11/2019 10:35, Simon Slavin wrote: On 23 Nov 2019, at 11:06pm, Richard Hipp wrote: given the choice between (1) Code that works and does something useful (2) Code that is standards compliant I'll always go with (1). Another problem is that different compilers, or the same compiler

[sqlite] sqldiff sameples

2019-11-23 Thread oleg boksner
has anyone successfully used this tool to do a reconciliation between two tables, i am looking to do simple rec between two tables on same db or if need be on sep db with same table name with a key, it seems to not work very well or often gives me an error saying that table does not exist in