Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Daniel Polski
Replace != with IS NOT. Regards, Clemens Thanks! Exactly what I looked for. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread R Smith
On 2016/10/13 1:09 PM, Hick Gunter wrote: (new.value != old.value) or (new.value IS NULL) or (old.value IS NULL) This will test true for a condition where new.value and old.value are both NULL (so technically not different), which may or may not be what the OP wanted.

Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread rhuijben
> -Original Message- > From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On > Behalf Of R Smith > Sent: donderdag 13 oktober 2016 17:37 > To: sqlite-users@mailinglists.sqlite.org > Subject: Re: [sqlite] Trigger WHEN condition, comparing with null > > > > On

Re: [sqlite] .mode column .width .separator

2016-10-13 Thread Simon Slavin
On 13 Oct 2016, at 7:51pm, Don V Nielsen wrote: > Unfortunately, there are two blanks separating each column Can you tell what characters these are ? Perhaps use a hexdump facility. My guess at this point is that you should continue with the file you have already

[sqlite] Header Change

2016-10-13 Thread Matías Badin
Hi everyone; I have a problem with my sqilte3 database. It works great for days/weeks/months but suddenly the error "file is encrypted or is not a database". Looking for the problem I realised that the header was changed. So I can recover it with an hexa editor, but I don´t know why this happens.

Re: [sqlite] .mode column .width .separator

2016-10-13 Thread Don V Nielsen
These are simply blanks, 0x20, use to create separation of the output columns. I'm assuming this is an inherent behavior for readability. If the output was not being directed to the output file, it would be directed to the display. I'm trying to avoid pre processing (creating a table or view of

[sqlite] .mode column .width .separator

2016-10-13 Thread Don V Nielsen
I am using the command line shell SQLite 3.14.2 2016-09-12. I'm working with mainframe data in a fixed format. I would like to use .mode column to create my output text file in a fixed layout. I set all my column widths using .width. I then output my data to a file. Unfortunately, there are two

Re: [sqlite] .mode column .width .separator

2016-10-13 Thread Simon Slavin
On 13 Oct 2016, at 7:51pm, Don V Nielsen wrote: > The .separator command does not provide any > mechanism for turning it off. Is there a way? Can't try it now but does .separator "" do what you want ? Simon. ___ sqlite-users

Re: [sqlite] .mode column .width .separator

2016-10-13 Thread Don V Nielsen
I can do this, which works. But the redundancy bothers me, and is prone to finger-check errors. with pre_process as ( select recid, z_num, zip, zip4, dpbc, case when piecerate in ('AF','RF') and version_id = '81' then '81' else segment end as segment, ... blah blah ...

Re: [sqlite] Header Change

2016-10-13 Thread Simon Slavin
On 13 Oct 2016, at 8:48pm, Matías Badin wrote: > I have a problem with my sqilte3 database. It works great for > days/weeks/months but suddenly the error "file is encrypted or is not a > database". > Looking for the problem I realised that the header was changed. So I

Re: [sqlite] .mode column .width .separator

2016-10-13 Thread Don V Nielsen
Thanks, but it appears that ".mode column" triggers it, and .separator does not appear to have any influence in that mode. Out of curiosity, it appears that the row separator (in windows) is a single character. Do you know to specify as the row separator? Everything I attempt is taken as literal

Re: [sqlite] .mode column .width .separator

2016-10-13 Thread John McKown
On Thu, Oct 13, 2016 at 2:42 PM, Don V Nielsen wrote: > Thanks, but it appears that ".mode column" triggers it, and .separator does > not appear to have any influence in that mode. > > Out of curiosity, it appears that the row separator (in windows) is a > single

Re: [sqlite] .mode column .width .separator

2016-10-13 Thread Don V Nielsen
Thanks John. I had a feeling you would have encountered this sort of stuff. And thanks for your time, Simon. All is appreciated. And thanks in advance, Dr. Hipp, if you act on this...allowing a \0 row separator in column mode. It would simplify the life of us mainframers. dvn On Thu, Oct 13,

Re: [sqlite] Backward cursor support?

2016-10-13 Thread Hick Gunter
SQLite supports only "forward cursors". You do realize that the example given is a "stored procedure"... -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Igor Korot Gesendet: Mittwoch, 12. Oktober 2016 18:49 An: SQLite

Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Hick Gunter
(new.value != old.value) or (new.value IS NULL) or (old.value IS NULL) -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Daniel Polski Gesendet: Donnerstag, 13. Oktober 2016 12:03 An: SQLite mailing list

[sqlite] Bug in lempar.c leads to compiler crashes

2016-10-13 Thread Benjamin Franksen
Hello it's me again, the guy who uses the lemon parser generator in his project (http://www-csr.bessy.de/control/SoftDist/sequencer/). I have found another problem in lempar.c. This one leads to crashes (assertion failures) in my compiler, at least on 64 bit systems (observed on Windows and

[sqlite] Static Analysis on sqlite codebase

2016-10-13 Thread Miroslav Franc
Hello, as a side effect of what I do I ran static analysis on sqlite codebase and found 4 defects. Two potential overflows and two unchecked calls. Not sure what is the best way to handle those, but please see the attached patch. Best regards, Miroslav Franc

[sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Daniel Polski
Hello, I guess there is something I'm missing when trying to synchronize some data with a trigger. How do I get the trigger to fire when the comparison in either new.x or old.x is null? The below tested with 3.8.6 sqlite command line shell: CREATE TABLE table1( idINTEGER PRIMARY

Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Clemens Ladisch
Daniel Polski wrote: > Any suggestion how to get the trigger to fire if (and only if) the > values are different, including if one of the "sides" of old/new are > null? Replace != with IS NOT. Regards, Clemens ___ sqlite-users mailing list

Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Kees Nuyt
On Thu, 13 Oct 2016 11:45:14 +0200, Daniel Polski wrote: That's because the expression in the WHEN clause (new.value != old.value) is not valid when one of them is NULL. HTH -- Regards, Kees Nuyt >Hello, >I guess there is something I'm missing when trying to

Re: [sqlite] Trigger WHEN condition, comparing with null

2016-10-13 Thread Daniel Polski
Thank you, I see. Any suggestion how to get the trigger to fire if (and only if) the values are different, including if one of the "sides" of old/new are null? Den 2016-10-13 kl. 11:56, skrev Kees Nuyt: On Thu, 13 Oct 2016 11:45:14 +0200, Daniel Polski wrote: That's

Re: [sqlite] Parallel access to read only in memory database

2016-10-13 Thread Daniel Meyer
>We are interested in using sqlite as a read only, in memory, parallel >access database. We have database files that are on the order of 100GB >that we are loading into memory. We have found great performance when >reading from a single thread. We need to scale up to have many parallel >reader

Re: [sqlite] Static Analysis on sqlite codebase

2016-10-13 Thread Richard Hipp
Attachments are stripped from this mailing list. Please send your attachments directly to me. As we are working toward the scheduled release of 3.15.0 tomorrow, please send your attachments as soon as possible. Thanks. On 10/11/16, Miroslav Franc wrote: > Hello, as a side

Re: [sqlite] Parallel access to read only in memory database

2016-10-13 Thread Howard Chu
Daniel Meyer wrote: We are interested in using sqlite as a read only, in memory, parallel access database. We have database files that are on the order of 100GB that we are loading into memory. We have found great performance when reading from a single thread. We need to scale up to have many