[sqlite] Error: no such column: When column exists! (Solved)

2015-07-15 Thread Jason H
Thanks everyone who chimed in about the non-breaking space issue! > Sent: Wednesday, July 15, 2015 at 3:53 PM > From: "Jason H" > To: sqlite-users at mailinglists.sqlite.org > Cc: "General Discussion of SQLite Database" mailinglists.sqlite.org> > Subject: Re: [sqlite] Error: no such column:

[sqlite] Error: no such column: When column exists! (solved and thanks)

2015-07-15 Thread Jason H
Thanks everyone! > Sent: Wednesday, July 15, 2015 at 4:33 PM > From: "Jason H" > To: sqlite-users at mailinglists.sqlite.org > Cc: sqlite-users at mailinglists.sqlite.org > Subject: Re: [sqlite] Error: no such column: When column exists! > > So after further review, there is a 0xa0 (non-breaking

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Jason H
So after further review, there is a 0xa0 (non-breaking space - ) character - a non-breaking space before the semi-colon. Thus making the column name analogous to ptn.TreatmentNoteID_; I guess it is functioning as intended? > Sent: Wednesday, July 15, 2015 at 3:53 PM > From: "Jason H" > To:

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Jason H
So yes, I was missing 'S's, but that is only because I've been hacking at the tables to get something to change. So the query you gave me works, however, when I put it all on the same line, it is identical to my query which does not. To prove this, I updated the file on github with a query

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Dominique Pellé
On Wed, Jul 15, 2015 at 8:43 PM, Richard Hipp wrote: > On 7/15/15, T?r?k Edwin wrote: >> On 07/15/2015 08:34 PM, T?r?k Edwin wrote: >> >> In fact such detection could be added to fuzzcheck.c too (I didn't know that >> you can detect presence of address sanitizer at

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Simon Slavin
On 15 Jul 2015, at 8:53pm, Jason H wrote: > sqlite> select * from PatientTreatmentNotes ptn join > PatientTreatmentNotesSteps pts ON pts.TreatmentNoteID = ptn.TreatmentNoteID ; > Error: no such column: ptn.TreatmentNoteID I downloaded your database file and copied straight from the above.

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Graham Holden
Hello Jason, Your second example ends with 0xA0 (a space with the high-bit set; sometimes used as a non-breaking space). Graham Holden Wednesday, July 15, 2015, 8:53:20 PM, you wrote: > So yes, I was missing 'S's, but that is only because I've been hacking at the > tables to get something to

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Török Edwin
On 07/15/2015 08:34 PM, T?r?k Edwin wrote: > On 07/15/2015 08:17 PM, Richard Hipp wrote: >> On 7/15/15, T?r?k Edwin wrote: >>> This might be just the test runner and not sqlite itself, I'm not sure: >>> >>> Time: capi2.test 25 ms >>>

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Török Edwin
On 07/15/2015 08:17 PM, Richard Hipp wrote: > On 7/15/15, T?r?k Edwin wrote: >> This might be just the test runner and not sqlite itself, I'm not sure: >> >> Time: capi2.test 25 ms >> = >> ==2330==ERROR:

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Peter Aronson
When I look at your queries table in sqlite3 in a windows command prompt, the failing SQL has a non-ASCII character instead of a semicolon. Peter On Wednesday, July 15, 2015 12:53 PM, Jason H wrote: So yes, I was missing 'S's, but that is only because I've been hacking at the tables

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Jason H
Since attachments are not supported, https://github.com/jhihn/files/blob/master/no_such_column.sqlite3 I apologize for the added complexity. > Sent: Wednesday, July 15, 2015 at 1:41 PM > From: "Jason H" > To: sqlite-users at mailinglists.sqlite.org > Cc: "General Discussion of SQLite Database"

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Jason H
Ok, I've dropped irrelevant tables, dropped the data, vacuumed, and am attaching the result. (Does this ML support attachments?) I was using v3.7.17, I tried the 3.8.5 and 3.8.10 releases, and all are the same error. > Sent: Wednesday, July 15, 2015 at 10:28 AM > From: "Donald Griggs" > To:

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Török Edwin
On 07/15/2015 06:59 PM, Richard Hipp wrote: > On 7/15/15, T?r?k Edwin wrote: >>> >>> 1) unknown-crash (might be due to some alignment requirements in asan): >> >> Build with clang 3.4 shows a heap-use-after-free instead of unknown-crash, >> and building a normal (just

[sqlite] journal file and its size

2015-07-15 Thread Simon Slavin
On 15 Jul 2015, at 6:40pm, Mayank Kumar (mayankum) wrote: > -what do you mean by journal file is created only when needed ? Is it not > true, that for any transactions it is always created. Yes, but many programs keep a connection to the database the whole time they're run, but seldom do

[sqlite] [PATCH] fix mksqlite3c.tcl --linemacros

2015-07-15 Thread Yuriy M. Kaminskiy
I noticed that when --linemacros option is used, line numbers are wrong, often by one line, sometimes more. This is due to bug in mksqlite3c.tcl tool, that output nothing when #include line is skipped. Trivial patch below. Index: sqlite3-3.8.10.2/tool/mksqlite3c.tcl

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Simon Slavin
On 15 Jul 2015, at 6:41pm, Jason H wrote: > (Does this ML support attachments?) Sorry, but no it doesn't. Simon.

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Simon Slavin
On 15 Jul 2015, at 5:28pm, T?r?k Edwin wrote: > Thanks, do I still need to turn this on if I run 'PRAGMA integrity_check'? You don't need to turn it on at all. It's there only to get rid of a warning from clang and a couple of other things. Simon.

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Török Edwin
On 07/15/2015 06:19 PM, Richard Hipp wrote: > On 7/15/15, T?r?k Edwin wrote: >> On 07/15/2015 12:05 AM, Richard Hipp wrote: >> >> I've run the address and undefined behaviour sanitizer (+ usual hardening >> and bug finding flags from Debian) from GCC 4.9.2 on Debian

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Török Edwin
On 07/15/2015 05:59 PM, T?r?k Edwin wrote: > On 07/15/2015 12:05 AM, Richard Hipp wrote: >> The plan is to release SQLite version 3.8.11 on or about the end of July. >> >> The current code is passing all tests that we have run against it. >> Some soak tests are still running. There are quite a

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Török Edwin
On 07/15/2015 12:05 AM, Richard Hipp wrote: > The plan is to release SQLite version 3.8.11 on or about the end of July. > > The current code is passing all tests that we have run against it. > Some soak tests are still running. There are quite a few > cross-platform tests (running on PPC, Sparc,

[sqlite] journal file and its size

2015-07-15 Thread Mayank Kumar (mayankum)
Thanks Clemens -what do you mean by journal file is created only when needed ? Is it not true, that for any transactions it is always created. The documentation here https://www.sqlite.org/tempfiles.html says in exclusive mode it is created at the start of first transaction and not deleted

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread Sergej Jurečko
An idea I?ve had a while ago was to implement functions for json documents (using sqlite3_create_function_v2) Json would be stored in a text column. You would need to define 2 functions: - docget(document,key1,subval1,subval2,?) - docset(document,key1,subval1,subval2,..,val) Last parameter of

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread Hayden Livingston
I'm beginning to understand some of the implementation challenges here. Eric, it'd be great to get that open sourced. I can tell you at least I will jump and prototype on it. Sergej and Roger, I do like this potential idea as well. Of course, now it's a custom sqlite, but at least the job gets

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Jason H
Whenever I try a multi-table join on a field I get a no such column error. sqlite> select * from PatientTreatmentNote ptn join PatientTreatmentNoteStep pts ON pts.TreatmentNoteID = ptn.TreatmentNoteID?; Error: no such column: ptn.TreatmentNoteID sqlite> .schema PatientTreatmentNote CREATE TABLE

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Simon Slavin
On 15 Jul 2015, at 3:09pm, Jason H wrote: > Whenever I try a multi-table join on a field I get a no such column error. > > sqlite> select * from PatientTreatmentNote ptn join PatientTreatmentNoteStep > pts ON pts.TreatmentNoteID = ptn.TreatmentNoteID ; > Error: no such column:

[sqlite] On delete cascade & create trigger order?

2015-07-15 Thread Daniel Polski
In my little test below, both the "ON DELETE CASCADE" in table_2 and the (later created) delete_trigger_2 are about to execute removal when a row in table_1 is removed. The table_3 also has the "ON DELETE CASCADE", but it doesn't yet have any content when removing the row in table_1 so it's

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread J Decker
On Wed, Jul 15, 2015 at 10:03 AM, Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 07/15/2015 08:22 AM, Sergej Jure?ko wrote: > > What do you guys think? Is it stupid, could it be improved? > > I recommend looking at Mongodb and Postgres first to see how they do >

[sqlite] How to perform regex on string

2015-07-15 Thread Rick
Is there a simple way to replace portions of a string using the regex function of sqlite without actually accessing any specific DB entres. Similar to SELECT strftime('%s','now') as unixtimestamp what just returns the result in unixtimestamp... just that I need to perform regex on a normal

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Richard Hipp
On 7/15/15, T?r?k Edwin wrote: > On 07/15/2015 08:34 PM, T?r?k Edwin wrote: > > In fact such detection could be added to fuzzcheck.c too (I didn't know that > you can detect presence of address sanitizer at compile time until now): It's a clever idea. I'm not so

[sqlite] journal file and its size

2015-07-15 Thread Clemens Ladisch
Mayank Kumar (mayankum) wrote: > Sometimes we see the journal file not present on the system although > active transactions are ongoing. How is that possible since the > documentation says the journal file is always created in exclusive > mode ? The journal file is created only when it is needed.

[sqlite] On delete cascade & create trigger order?

2015-07-15 Thread Simon Slavin
On 15 Jul 2015, at 2:07pm, Daniel Polski wrote: > Or if there is a more elegant solution I haven't thought about? I would suggest here that you rethink your reason for needing three tables table_1, table_2 and table_3. It looks more like you need only one table here, with 'id', 'starttime'

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Richard Hipp
On 7/15/15, Jason H wrote: > Since attachments are not supported, > https://github.com/jhihn/files/blob/master/no_such_column.sqlite3 > The table names were both misspelled in your original query. After I fixed that, everything seems to work. I tested with 3.7.8, 3.7.17, 3.8.0, 3.8.7, and

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Donald Griggs
Jason, I downloaded your database and copied the SELECT from your original post. sqlite> select * from PatientTreatmentNote ptn join PatientTreatmentNoteStep pts ON pts.TreatmentNoteID = ptn.TreatmentNoteID ; Error: no such table: PatientTreatmentNote (note that this was because table name

[sqlite] New SQLite ODBC driver

2015-07-15 Thread Denis Yanov
Devart team is proud to introduce new SQLite ODBC Drivers. The most significant features in this version are: - Direct Mode - allows to connect to your databases directly via TCP/IP avoiding DB client software, thus simplifying application deployment process and increasing performance. -

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Richard Hipp
On 7/15/15, T?r?k Edwin wrote: > > I've attached a patch that fixes these warnings from GCC > No attachments on this mailing list. Can you send the patch via direct email to me? -- D. Richard Hipp drh at sqlite.org

[sqlite] [PATCH] fix mksqlite3c.tcl --linemacros

2015-07-15 Thread Joe Mistachkin
Yuriy M. Kaminskiy > > I noticed that when --linemacros option is used, line numbers are wrong, > often by one line, sometimes more. This is due to bug in mksqlite3c.tcl > tool, that output nothing when #include line is skipped. > Trivial patch below. > Thanks for the report. This should

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Richard Hipp
On 7/15/15, T?r?k Edwin wrote: > This might be just the test runner and not sqlite itself, I'm not sure: > > Time: capi2.test 25 ms > = > ==2330==ERROR: AddressSanitizer: heap-use-after-free on address >

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread Alek Paunov
Hi Hayden, On 14.07.2015 03:43, Hayden Livingston wrote: > Is there a concept of a schema-less JSON SQLite DB? > > My reason is simple: versioning. We have lot of business metrics that > get updated let's say once a month, and we need to be agile to get > them. Right now, we just put the

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Richard Hipp
On 7/15/15, T?r?k Edwin wrote: >> >> 1) unknown-crash (might be due to some alignment requirements in asan): > > Build with clang 3.4 shows a heap-use-after-free instead of unknown-crash, > and building a normal (just ./configure) executable with GCC and running >

[sqlite] SQLite version 3.8.11 coming soon...

2015-07-15 Thread Richard Hipp
On 7/15/15, T?r?k Edwin wrote: > On 07/15/2015 12:05 AM, Richard Hipp wrote: > > I've run the address and undefined behaviour sanitizer (+ usual hardening > and bug finding flags from Debian) from GCC 4.9.2 on Debian Jessie on this > fossil checkout:

[sqlite] Error: no such column: When column exists!

2015-07-15 Thread Donald Griggs
Jason, I think your problem description is too abbreviated to allow anyone to easily reproduce it. Maybe you can repost with a minimal example of the failure, but include a full script that will show the problem, and let us know what version of the sqlite3 commandline utility was used and what

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 07/15/2015 08:22 AM, Sergej Jure?ko wrote: > What do you guys think? Is it stupid, could it be improved? I recommend looking at Mongodb and Postgres first to see how they do queries. It would be better to be compatible with them where practical,

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread Eric Rubin-Smith
Given the number of the threads in the list, it seems a > lot of people want hierarchical data in SQLite :-) > Throwing in another $.02 here, my company had a need to ingest JSON of various formats into SQLite databases in low-power embedded devices. We wrote the utility program described here:

[sqlite] journal file and its size

2015-07-15 Thread Mayank Kumar (mayankum)
Our application uses the following pragma with sqlite 3.7.7.1 PRAGMA synchronous=FULL; PRAGMA locking_mode=EXCLUSIVE"; I understand from the documentation that with exclusive mode the journal file is always created and never deleted until the exclusive mode is exited. Now my questions are:-

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread Hick Gunter
The record sort order is: NULLs Numeric by value Text by collating function Blob by memcmp order So your result set will contain all rows having a FooColumn with numeric value greater than 50, a text value or a blob value. -Urspr?ngliche Nachricht- Von: Hayden Livingston

[sqlite] Schema-less JSON SQLite DB?

2015-07-15 Thread J Decker
On Wed, Jul 15, 2015 at 2:14 AM, Alek Paunov wrote: > Hi Hayden, > > On 14.07.2015 03:43, Hayden Livingston wrote: > >> Is there a concept of a schema-less JSON SQLite DB? >> >> My reason is simple: versioning. We have lot of business metrics that >> get updated let's say once a month, and