[sqlite] SQLITE_CANTOPEN after days of operation

2015-10-13 Thread Simon Slavin
On 13 Oct 2015, at 6:32pm, Scott Hess wrote: > This implies that the process was previously able to open journal files in > that directory. Having access rights to the database files change for no > reason is concerning, but so is having them not change but it just doesn't > work! You might

[sqlite] How to customize my own wal-index using heap memory?

2015-10-13 Thread sanhua.zh
Ashttps://www.sqlite.org/wal.html mentioned, Specialized applications for which the default implementation of shared memory is unacceptable can devise alternative methods via a customVFS. For example, if it is known that a particular database will only be accessed by threads within a single

[sqlite] Using CTE with INSERT

2015-10-13 Thread Clemens Ladisch
Don V Nielsen wrote: > I'm struggling to implement an INSERT statement that get's is values from a > CTE. > > insert into vo_crrt_pieces (recid) > values ( > with > pkg_controls AS ( > SELECT * FROM d_pkg WHERE pkg_level = 'CRD' > ) > -- select pieces that meeting pkg and pkg_level

[sqlite] SQLITE_CANTOPEN after days of operation

2015-10-13 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 10/11/2015 12:56 PM, Andrew Miles wrote: >>> 5) I ran lsof on the db, only one process (this one) had the >>> file open Have you run lsof on your monitoring process? You may be running out of file descriptors that are accessing other files or

[sqlite] SQLITE_CANTOPEN after days of operation

2015-10-13 Thread Scott Hess
On Sun, Oct 11, 2015 at 12:56 PM, Andrew Miles wrote: > Log showed it unable to open the directory and then unable to write the > journal file. The directory is root writable and the process is run as > root so I didn't expect a problem here. I've now modified the directory > access to be

[sqlite] Using CTE with INSERT

2015-10-13 Thread John McKown
On Tue, Oct 13, 2015 at 8:28 AM, Don V Nielsen wrote: > The syntax "WITH p AS (SELECT 1) INSERT INTO t(x) SELECT * FROM p;" throws > the same exception: "[2015-10-13 08:20:22] [1] [SQLITE_ERROR] SQL error or > missing database (near ")": syntax error)" > > On my system, RedHat Linux, Fedora 22,

[sqlite] Using CTE with INSERT

2015-10-13 Thread Don V Nielsen
This is an IDE issue. If I run my queries from the command line, all is good. Sorry for the confusion. It is when I run my queries through my Rubymine IDE that I am getting exceptions thrown. I need to investigate what version of Sqlite is being implemented. Something learned is always a good

[sqlite] Using CTE with INSERT

2015-10-13 Thread Don V Nielsen
The syntax "WITH p AS (SELECT 1) INSERT INTO t(x) SELECT * FROM p;" throws the same exception: "[2015-10-13 08:20:22] [1] [SQLITE_ERROR] SQL error or missing database (near ")": syntax error)" On Tue, Oct 13, 2015 at 8:17 AM, Clemens Ladisch wrote: > Don V Nielsen wrote: > > I'm struggling to

[sqlite] Using CTE with INSERT

2015-10-13 Thread Don V Nielsen
I'm struggling to implement an INSERT statement that get's is values from a CTE. What I want to do is identify zip/crrt combinations at meet minimum qty specifications, and then insert into a table the recid values of those record destined to the identify zip/crrts. While the syntax below is