Re: [sqlite] Problem with CASE in WHERE clause

2016-12-04 Thread Jean-Christophe Deschamps
At 06:29 05/12/2016, you wrote: My app supports sqlite3, SQL Server, and PostgreSQL. SQL Server has a ‘bit’ data type, which accepts 1/0 and ‘1’/’0’ as valid values. PostgreSQL has a ‘bool’ data type, which supports a variety of values ­ TRUE, ‘t’, ‘true’, ‘yy’,

Re: [sqlite] Problem with CASE in WHERE clause

2016-12-04 Thread Frank Millman
From: Don V Nielsen Sent: Sunday, December 04, 2016 5:15 PM To: SQLite mailing list Subject: Re: [sqlite] Problem with CASE in WHERE clause > Sorry, but the whole scenario is messy, at best. The column is declared bool, and then a string '1' is assigned to it. The case lacks an else, so it resu

Re: [sqlite] Scope of sqlite3_update_hook?

2016-12-04 Thread Roger Binns
On 01/12/16 16:51, Jens Alfke wrote: > If so, then does that include connections in other OS processes? (I'm looking > for a way to detect this.) You can't get a callback when other processes change the database for many reasons. However it is possible to detect if the database has changed: h

Re: [sqlite] I keep getting seg faults building my database using python sqlite3

2016-12-04 Thread Keith Medcalf
If pressing the CAPS LOCK or NUM LOCK keys on the keyboard does not toggle the light on the keyboard then you have lost the all interrupt processing since those keypresses have to be processed by the kernel mode keyboard driver toggling the internal state of the keyboard driver, and then the ke

Re: [sqlite] I keep getting seg faults building my database using python sqlite3

2016-12-04 Thread Kevin O'Gorman
Well, the i7 system failed again, but this time it was quite different. And peculiar. The system wasn't doing anything, but it should have been. So I tried something. It didn't matter what, because I could not get the mouse or keyboard to work -- it was like they weren't plugged in. Really like i

Re: [sqlite] Problem with CASE in WHERE clause

2016-12-04 Thread Don V Nielsen
Sorry, but the whole scenario is messy, at best. The column is declared bool, and then a string '1' is assigned to it. The case lacks an else, so it resulting in one of two types: a string when true and an integer when false. Correct? And then on top of that, as Simon pointed out, the column affini

Re: [sqlite] Problem with CASE in WHERE clause

2016-12-04 Thread Frank Millman
From: Simon Slavin Sent: Sunday, December 04, 2016 10:26 AM To: SQLite mailing list Subject: Re: [sqlite] Problem with CASE in WHERE clause > On 4 Dec 2016, at 6:55am, Frank Millman wrote: > > > If a column contains a ‘1’, I would expect sqlite3 to return true when > > testing for ‘1’, but

Re: [sqlite] Problem with CASE in WHERE clause

2016-12-04 Thread Simon Slavin
On 4 Dec 2016, at 6:55am, Frank Millman wrote: > If a column contains a ‘1’, I would expect sqlite3 to return true when > testing for ‘1’, but in my example it returns false. I think I’ve found the problem. Here is your syntax: SELECT * FROM test_1 WHERE CASE WHEN tran_type = 'inv' THEN post