Re: [sqlite] CREATE TABLE fails

2016-11-22 Thread Igor Korot
Hi, guys, Parents with the comma before "PRIMARY" fixed it. Thx. On Tue, Nov 22, 2016 at 9:39 AM, Niall O'Reilly wrote: > On 22 Nov 2016, at 14:35, David Raymond wrote: > >> It's needed. The arrow coming out of [column-def] (visually) goes past >> [table-constraint]

Re: [sqlite] Table name syntax

2016-11-22 Thread James K. Lowden
On Mon, 21 Nov 2016 20:46:45 + David Raymond wrote: > insert into main.foo > select db1.foo.* > from db1.foo left outer join db2.bar > on db1.foo.pk = db2.bar.pk > where db2.bar.pk is null; Just by the way, your query could be cast as insert into main.foo select

Re: [sqlite] Pragma to flag unknown pragma?

2016-11-22 Thread R Smith
On 2016/11/23 2:08 AM, Scott Hess wrote: https://www.sqlite.org/pragma.html has: "No error messages are generated if an unknown pragma is issued. Unknown pragmas are simply ignored. This means if there is a typo in a pragma statement the library does not inform the user of the fact." I just

Re: [sqlite] Tcl bindings doc update request

2016-11-22 Thread Rolf Ade
I certainly apologzize, to rise this a third time; I will stop to do it again. Still, I think the documentation of the busy method of the Tcl interface to sqlite http://sqlite.org/tclsqlite.html#busy lacks the information, that the callback procedure will be called with one argument. Rolf

Re: [sqlite] Table name syntax

2016-11-22 Thread David Raymond
Makes sense, thanks. For one-offs and things like the "Copying from one table to another" thread that aren't going to be part of a regular running program it's easy enough to use the alias version. -Original Message- From: sqlite-users

[sqlite] CREATE TABLE fails

2016-11-22 Thread Igor Korot
Hi, ALL, SQLite version 3.13.0 2016-05-18 10:57:30 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> CREATE TABLE IF NOT EXISTS abc("abc_tnam" char(129) NOT NULL, "abc_tid" integer, "abc_ownr" char(129) NOT

Re: [sqlite] creating a table

2016-11-22 Thread R Smith
On 2016/11/22 6:00 PM, John R. Sowden wrote: That was a throw back to years ago. I was trying to protect against y2k by making each dbf for 1 calendar year. Also, these files are about 800k in size, so I was worried about storage and search time. Storage is not an issue anymore. I will

Re: [sqlite] When does SQLite open/create files?

2016-11-22 Thread Jens Alfke
> On Nov 21, 2016, at 12:39 PM, Richard Hipp wrote: > > On 11/21/16, Jens Alfke wrote: >> Does SQLite ever open or create files while a database connection is already >> open? > > (1) When you run ATTACH. > > (2) The open/create of the original database

Re: [sqlite] CREATE TABLE fails

2016-11-22 Thread Richard Hipp
On 11/22/16, Igor Korot wrote: > Hi, ALL, > SQLite version 3.13.0 2016-05-18 10:57:30 > Enter ".help" for usage hints. > Connected to a transient in-memory database. > Use ".open FILENAME" to reopen on a persistent database. > sqlite> CREATE TABLE IF NOT EXISTS abc("abc_tnam"

Re: [sqlite] CREATE TABLE fails

2016-11-22 Thread Quan Yong Zhai
CREATE TABLE IF NOT EXISTS abc("abc_tnam" char(129) NOT NULL, "abc_tid" integer, "abc_ownr" char(129) NOT NULL, "abc_cnam" char(129) NOT NULL , "abc_cid" smallint, "abc_labl" char(254), "abc_lpos" smallint, "abc_hdr" char( 254), "abc_hpos" smallint, "abc_itfy" smallint, "abc_mask" char(31),

Re: [sqlite] CREATE TABLE fails

2016-11-22 Thread Niall O'Reilly
On 22 Nov 2016, at 14:35, David Raymond wrote: It's needed. The arrow coming out of [column-def] (visually) goes past [table-constraint] first, with the option to loop down to a comma on its way to a [table-constraint] Thanks. My gut told me one thing, my eyes another. Eyes were wrong.

Re: [sqlite] compilation warnings sqlite3

2016-11-22 Thread Christoph P.U. Kukulies
Am 22.11.2016 um 16:27 schrieb Christoph P.U. Kukulies: To whom it may concern: while compiling sqlite3 under FreeBSD-11.0-RELEASE a compiler warning rushed over the screen: Sorry, this message got prematurely dismissed: te3.Tpo -c sqlite/sqlite3.c -o sqlite/libsqlite_static_la-sqlite3.o

Re: [sqlite] CREATE TABLE fails

2016-11-22 Thread Niall O'Reilly
On 22 Nov 2016, at 14:03, Richard Hipp wrote: On 11/22/16, Igor Korot wrote: Hi, ALL, SQLite version 3.13.0 2016-05-18 10:57:30 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite>

Re: [sqlite] CREATE TABLE fails

2016-11-22 Thread Hick Gunter
Perhaps you mean ...,"a bc_tag" char(254), PRIMARY KEY ("abc_tnam", "abc_ownr", "abc_cnam") ); -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Igor Korot Gesendet: Dienstag, 22. November 2016 14:46 An: Discussion of

Re: [sqlite] CREATE TABLE fails

2016-11-22 Thread David Raymond
It's needed. The arrow coming out of [column-def] (visually) goes past [table-constraint] first, with the option to loop down to a comma on its way to a [table-constraint] -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Niall

[sqlite] compilation warnings sqlite3

2016-11-22 Thread Christoph P.U. Kukulies
To whom it may concern: while compiling sqlite3 under FreeBSD-11.0-RELEASE a compiler warning rushed over the screen: ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org

Re: [sqlite] compilation warnings sqlite3

2016-11-22 Thread Richard Hipp
On 11/22/16, Christoph P.U. Kukulies wrote: > Am 22.11.2016 um 16:27 schrieb Christoph P.U. Kukulies: >> To whom it may concern: while compiling sqlite3 under >> FreeBSD-11.0-RELEASE >> a compiler warning rushed over the screen: > Sorry, this message got prematurely dismissed:

Re: [sqlite] compilation warnings sqlite3

2016-11-22 Thread Richard Hipp
On 11/22/16, Christoph P.U. Kukulies wrote: > Am 22.11.2016 um 16:39 schrieb Richard Hipp: >> On 11/22/16, Christoph P.U. Kukulies wrote: >>> Am 22.11.2016 um 16:27 schrieb Christoph P.U. Kukulies: To whom it may concern: while compiling sqlite3 under

Re: [sqlite] creating a table

2016-11-22 Thread John R. Sowden
That was a throw back to years ago. I was trying to protect against y2k by making each dbf for 1 calendar year. Also, these files are about 800k in size, so I was worried about storage and search time. Storage is not an issue anymore. I will know about search time after learning about sql

Re: [sqlite] creating a table

2016-11-22 Thread Igor Korot
John, On Tue, Nov 22, 2016 at 11:00 AM, John R. Sowden wrote: > That was a throw back to years ago. I was trying to protect against y2k by > making each dbf for 1 calendar year. Also, these files are about 800k in > size, so I was worried about storage and search

Re: [sqlite] compilation warnings sqlite3

2016-11-22 Thread Christoph P.U. Kukulies
Am 22.11.2016 um 16:39 schrieb Richard Hipp: On 11/22/16, Christoph P.U. Kukulies wrote: Am 22.11.2016 um 16:27 schrieb Christoph P.U. Kukulies: To whom it may concern: while compiling sqlite3 under FreeBSD-11.0-RELEASE a compiler warning rushed over the screen: Sorry,

Re: [sqlite] creating a table

2016-11-22 Thread Simon Slavin
On 22 Nov 2016, at 5:03pm, John R. Sowden wrote: > Thank you, but I am currently in the early learning phase of sql databases > and the sql language. I am starting with Sqlite due to its relative > simplicity, and moving on to H2 to integrate it into Libre Office.

Re: [sqlite] creating a table

2016-11-22 Thread John R. Sowden
Thank you, but I am currently in the early learning phase of sql databases and the sql language. I am starting with Sqlite due to its relative simplicity, and moving on to H2 to integrate it into Libre Office. It's commands like analyze that I have never heard of and need to become familiar

Re: [sqlite] When does SQLite open/create files?

2016-11-22 Thread Richard Hipp
On 11/22/16, Jens Alfke wrote: > > I did not close the database handle, so if SQLite is trying to open the file > at this moment, it must have closed it earlier on its own. > Or could it be the WAL file? Does SQLite ever close and reopen, or delete > and re-create, the WAL?

[sqlite] Pragma to flag unknown pragma?

2016-11-22 Thread Scott Hess
https://www.sqlite.org/pragma.html has: "No error messages are generated if an unknown pragma is issued. Unknown pragmas are simply ignored. This means if there is a typo in a pragma statement the library does not inform the user of the fact." I just lost some time due to this, even though I was

Re: [sqlite] creating a table

2016-11-22 Thread Christoph P.U. Kukulies
Just a thought about your TABLE named "log16": I'm not at all a database expert but from the idea what a table is, I would take a more general approach. CREATE a TABLE log with columns year, logtext, timestamp a la: CREATE TABLE LOG (logtext TEXT, timestamp TEXT, year INTEGER PRIMARY KEY)