Re: [sqlite] pragma foreign_key_check

2018-03-17 Thread Mark Wagner
That's what I get for just typing in to sqlite3. Yes, with the unique constraint it works. Thanks! On Sat, Mar 17, 2018 at 12:53 PM Keith Medcalf wrote: > > Nor does there appear to be "column names" ... and this with the current > tip of the trunk. > > SQLite version

Re: [sqlite] Lazy virtual table creation

2018-03-17 Thread Marco Bambini
Philippe, with a bit of work you can use the authorize api in order to know when an access to a non existing table is performed. https://sqlite.org/c3ref/set_authorizer.html Hope this helps. -- Marco Bambini http://www.sqlabs.com http://twitter.com/sqlabs > On 17 Mar 2018, at 15:53, Philippe

Re: [sqlite] Lazy virtual table creation

2018-03-17 Thread Richard Hipp
On 3/17/18, Philippe Riand wrote: > We are using virtual tables to provide an SQL access to our data set and > this works very well. But we have potentially "a lot” of virtual tables, > with some even yet unknown when we start the DB. We’d like to create them > lazily, on

[sqlite] Lazy virtual table creation

2018-03-17 Thread Philippe Riand
We are using virtual tables to provide an SQL access to our data set and this works very well. But we have potentially "a lot” of virtual tables, with some even yet unknown when we start the DB. We’d like to create them lazily, on first access. Is there a hook we can use so when an SQL

Re: [sqlite] Is it possible to CREATE TABLE from other tables in a complex way?

2018-03-17 Thread R Smith
On 2018/03/17 12:40 PM, csanyipal wrote: R Smith-2 wrote Here is a query that will produce all days of the year (without Sundays) plus their week days (and I've expanded for lesson blocks too, but you will probably need to add/edit as I don't know the exact values, but the method should be

Re: [sqlite] pragma foreign_key_check

2018-03-17 Thread Keith Medcalf
Right you are Clemens: SQLite version 3.23.0 2018-03-16 07:48:43 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> PRAGMA foreign_keys=OFF; sqlite> BEGIN TRANSACTION; sqlite> CREATE TABLE t (id int primary

Re: [sqlite] pragma foreign_key_check

2018-03-17 Thread Keith Medcalf
Nor does there appear to be "column names" ... and this with the current tip of the trunk. SQLite version 3.23.0 2018-03-16 07:48:43 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> PRAGMA

Re: [sqlite] pragma foreign_key_check

2018-03-17 Thread Clemens Ladisch
Mark Wagner wrote: > The documentation for foreign_key_check says I should be receiving 4 > columns per violation. I only seem to be getting 1. > > CREATE TABLE t (id int primary key, value); > CREATE TABLE t1 (id integer primary key, v references t(value)); > sqlite> pragma foreign_key_check; >

[sqlite] pragma foreign_key_check

2018-03-17 Thread Mark Wagner
The documentation for foreign_key_check says I should be receiving 4 columns per violation. I only seem to be getting 1. Am I doing it wrong? Perhaps it's a version issue? Thanks sqlite> .dump PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE t (id int primary key, value); CREATE TABLE

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-17 Thread Luuk
0 C:\Users\Luuk\AppData\Roaming\Thunderbird\Profiles\.default>sqlite3 global-messages-db.sqlite ".schema --indent" | findstr /i "autoincrement" C:\Users\Luuk\AppData\Roaming\Thunderbird\Profiles\.default> On 16-3-2018 16:37, Richard Hipp wrote: > '.schema --indent'

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-17 Thread Stephen Chrzanowski
Every table I create that is considered a primary resource, I use auto-increment on exactly one field. Any table I create that uses auto-increment is used for internal use within the database, or, an "object" to point an item in a tStringList to the database row. This integer is NEVER given

Re: [sqlite] Is it possible to CREATE TABLE from other tables in a complex way?

2018-03-17 Thread Keith Medcalf
PAR is Parameters (calendar start and end) RES is Results from what I see anyway ... --- 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 [mailto:sqlite-users-

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-17 Thread Rob Willett
We have 17 in one database and 1 in another. Rob On 17 Mar 2018, at 11:43, x wrote: 0 in my first sqlite3 DB From: sqlite-users on behalf of Jean-Christophe Deschamps Sent: Saturday, March

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-17 Thread x
0 in my first sqlite3 DB From: sqlite-users on behalf of Jean-Christophe Deschamps Sent: Saturday, March 17, 2018 9:04:22 AM To: SQLite mailing list Subject: Re: [sqlite] How many AUTOINCREMENT

Re: [sqlite] Is it possible to CREATE TABLE from other tables in a complex way?

2018-03-17 Thread csanyipal
R Smith-2 wrote > Here is a query that will produce all days of the year (without Sundays) > plus their week days (and I've expanded for lesson blocks too, but you > will probably need to add/edit as I don't know the exact values, but the > method should be clear). You can JOIN this to the

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-17 Thread Jean-Christophe Deschamps
How many tables in your schema(s) use AUTOINCREMENT? Maybe a dozen uses in DB designs I made for my own use. Zero or very few in designs made for others. My use case of autoincrement is certainly somehow peculiar. For some of DBs I use daily for managing my own business (I'm

Re: [sqlite] How many AUTOINCREMENT tables are in your schema?

2018-03-17 Thread Norman Dunbar
5. 5 tables in my first SQLite database. Cheers, Norm. -- Sent from my Android device with K-9 Mail. Please excuse my brevity. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org