Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread dandl
From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Keith Medcalf >>>SQLite does not use the glob function from the standard library -- the >>>function is defined in func.c >>> >>>Both "glob" and "like" call the same function, likeFunc with different sets

Re: [sqlite] Foreign key integrity checking.

2017-01-06 Thread Dominique Devienne
On Fri, Jan 6, 2017 at 10:30 PM, David Raymond wrote: > http://www.sqlite.org/foreignkeys.html > > My version of the very basic basics anyway: > -Foreign key enforcement is turned on or off with a pragma and is a > connection-level setting, not a property of the

Re: [sqlite] Foreign key integrity checking.

2017-01-06 Thread David Raymond
http://www.sqlite.org/foreignkeys.html My version of the very basic basics anyway: -Foreign key enforcement is turned on or off with a pragma and is a connection-level setting, not a property of the database itself. -The default enforcement is off unless a compile option is used. -So unless you

[sqlite] Foreign key integrity checking.

2017-01-06 Thread Michael Tiernan
I'm going to assume this has come up before so instead of asking for help, I'll simply ask for pointers to FAQs about some of the more mundane things such as ensuring foreign key integrity and checking for it. Thanks for everyone's time. -- << MCT >> Michael C Tiernan.

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread Keith Medcalf
On Friday, 6 January, 2017 12:49, James K. Lowden wrote: > On Fri, 6 Jan 2017 10:23:06 +1100 > "dandl" wrote: > > > Unix globbing for Linux is defined here: > > http://man7.org/linux/man-pages/man7/glob.7.html. AFAICT Sqlite does > > not implement

Re: [sqlite] Date Formatting from Excel Float Date/Time Representation

2017-01-06 Thread Ben Newberg
select t0.key, "Issue Type", strftime('%Y-%m-%d %H:%M:%S', (Updated - (julianday('1970-01-01') - julianday('1899-12-30'))) + 2440587.5) Updated from JIRA_Stat_0_20170106124800 t0 inner join JIRA_Stat_1_20170106124800 t1 on t0.key = t1.key where "Last Comment" is not null order by assignee;

Re: [sqlite] Date Formatting from Excel Float Date/Time Representation

2017-01-06 Thread Jens Alfke
> On Jan 6, 2017, at 12:16 PM, Ed Lipson wrote: > > The Updated column is properly reflected as a float, as that is the > internal Excel format. What formatting functions can I use to get it to > appear as a date time in SQL output, as it appears in Excel? I have tried >

[sqlite] Date Formatting from Excel Float Date/Time Representation

2017-01-06 Thread Ed Lipson
I'm trying to work with JIRA information. I export my JIRA records and load them into a SQLite3 database via a python script. The export is in Excel format. When I send the data back from SQLite3 to Excel and have Excel format the date, it is correctly interpreted. From that I am assuming I have a

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread Richard Hipp
On 1/6/17, James K. Lowden wrote: > > A quick scan of SQLite sources shows only references to the glob > function, no implementation. The implementation is built-in here: https://www.sqlite.org/src/artifact/d8582ee919759756?ln=610-770 For portability reasons, SQLite

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread dmp
> I'm still trying to figure out a graceful way to implement > a "scratch" database table that has the following properties: > o Can be created on demand while a database connection is open. > o Can include references to other material in the database to > ensure integrity. > o Will be

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread James K. Lowden
On Thu, 5 Jan 2017 19:26:26 + "Smith, Randall" wrote: > * Can be created on demand while a database connection is open. > * Can include references to other material in the database to >ensure integrity. > * Will be automatically deleted when the database is

Re: [sqlite] Performance degradation of in-memory database with high row count and overall design discussion of my project

2017-01-06 Thread James K. Lowden
On Thu, 5 Jan 2017 18:56:13 +0100 Simone Mosciatti wrote: > I could store in some buffer some SQL statement and I could execute > all of them in one single transaction. That's a good idea, all things being equal. But are they equal? Your problem description is entirely

Re: [sqlite] SQLite3 Tutorial error

2017-01-06 Thread James K. Lowden
On Fri, 6 Jan 2017 10:23:06 +1100 "dandl" wrote: > Unix globbing for Linux is defined here: > http://man7.org/linux/man-pages/man7/glob.7.html. AFAICT Sqlite does > not implement this behaviour. A quick scan of SQLite sources shows only references to the glob function, no

Re: [sqlite] sqlite-users Digest, Vol 109, Issue 6

2017-01-06 Thread Simon Slavin
On 6 Jan 2017, at 3:20pm, Simone Mosciatti wrote: > 1. Retrieve the connection object inside Redis > 2. Parse the SQL statement (sqlite3_prepare_v2) > 3. Execute the parsed statement > 4. Return an "OK" to the client Are you using the sequence sqlite3_prepare_v2(),

Re: [sqlite] sqlite-users Digest, Vol 109, Issue 6

2017-01-06 Thread Simone Mosciatti
Hi Dan, I run your TCL script and I can confirm that I am seeing values extremely different, in my machine, the same that I used for the previous test, I got a rather stable 240k insert per second. In my understanding my code is not doing anything different. The only difference is the

Re: [sqlite] Bad query plan selection only with "LEFT JOIN"

2017-01-06 Thread Domingo Alvarez Duarte
Hello Don ! Thanks for reply ! It's my fault I wrote it without actually testing it for the purpose of show my use case: === -- -- Ideally I want to write the next query using the previous view -- CREATE VIEW if not exists "despesas_master_list_view_tidy" AS SELECT a.*, b.name as

Re: [sqlite] Bad query plan selection only with "LEFT JOIN"

2017-01-06 Thread Don V Nielsen
In the below view, what is "a"? A FROM is not defined. -- -- Ideally I want to write the next query using the previous view -- CREATE VIEW if not exists "despesas_master_list_view_tidy" AS SELECT a.*, b.name as modalidade_licitacao, c.name as credor, d.* LEFT JOIN

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread Domingo Alvarez Duarte
Hello Simon ! Thanks for reply ! I already raised this point here before and asked people using sqlite with multi million records and they said that they use sqlite mostly as append/read only on this case. I raised one example when sqlite uses too much memory and even Richard Hipp

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread Simon Slavin
On 6 Jan 2017, at 10:10am, Domingo Alvarez Duarte wrote: > Why I want this ? > > To overcome sqlite3 limitations with one writer per database and difficulty > to manage multi million records tables spreading then in individual databases. SQLite does not have a limitation

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread Domingo Alvarez Duarte
Hello ! I'm also looking for a way to achieve something similar but using attached databases, I mean: Open a local database that automatically attach other databases and have views/triggers that use/apply to the attached databases. Why I want this ? To overcome sqlite3 limitations with

Re: [sqlite] Bad query plan selection only with "LEFT JOIN"

2017-01-06 Thread Domingo Alvarez Duarte
Hello Richard ! The simple example I've sent is the minimal to show the problem, the real database schema where I found this problem has a lot of small tables joined and I was using the views to simplify (not duplicate) code, so on that case it'll result in bloat and repetition. see bellow:

Re: [sqlite] Quest for "scratch table" implementation in SQLite.

2017-01-06 Thread Dominique Devienne
On Thu, Jan 5, 2017 at 11:40 PM, Simon Slavin wrote: > On 5 Jan 2017, at 7:26pm, Smith, Randall wrote: > > I'm still trying to figure out a graceful way to implement a "scratch" > database table that has the following properties: > > > >o