Re: [sqlite] Will someone be able to explain this weird outcome...

2014-10-10 Thread tonyp
Apparently, in trying to make numbers out of strings, it is interpreted as 7 - 5 = 2 and the part after the comma is truncated. -Original Message- From: jose isaias cabrera sqlite> select "7,915" - "5,021"; 2 But, would someone explain the result of 2? Sorry for this child-like

Re: [sqlite] Will someone be able to explain this weird outcome...

2014-10-11 Thread tonyp
Well, OK, but you attributed the quote to the wrong person. :) -Original Message- From: Simon Slavin Sent: Saturday, October 11, 2014 2:38 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Will someone be able to explain this weird outcome... On 10 Oct 2014, at

Re: [sqlite] Saving PDF Files in SQlite

2015-01-15 Thread tonyp
From the SQLite3 shell (recent version), use the readfile('filename') function to import into a blob field, and the writefile('filename',field) for exporting back to a file. See here: http://www.sqlite.org/cli.html -Original Message- From: John Payne Sent: Thursday, January 15, 2015

Re: [sqlite] Proposed enhancement to the sqlite3.exe command-lineshell

2014-02-10 Thread tonyp
I second the idea of a kind of "WARNING: All your work will be lost, are you sure you want to quit? (y/N)" on trying to exit, but *ONLY* if the application was started by (double-)clicking on it, otherwise the warning will be a nuisance when running test scripts. -Original Message-

Re: [sqlite] SQLite version 3.8.4 release schedule

2014-03-05 Thread tonyp
I noticed the message: Enter SQL statements terminated with a ";" was removed from the shell. Is this supposed to be in the right direction when a red message is added to warn newbies to SQLite about working with in-memory database, yet they are assumed to know that SQL commands end with

[sqlite] Suggestion for shell .IMPORT improvement

2014-05-17 Thread tonyp
Hello, When .importing from a csv file (for example) with a command like ".import data.csv data" if the table does not exist, the table is created using the first row of data.csv as the field names. But if the same file is imported a second time, the first line is treated as data. My

[sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-18 Thread tonyp
Hi all, First of all, this is not about using SQLite as an embedded library from C, or whatever other language. It does not affect the sqlite3.c file at all. It only applies to the shell (so logically, it only affects shell.c) So here’s my suggestion for what (I feel) is a significant

Re: [sqlite] Suggestion for SHELL impovement (built-in scripting)

2014-06-19 Thread tonyp
Stored procedure would be a great addition. But they would be not in the shell, they belong in the library core. Scripts are already a part of the current functionality. Only they have to be external. There no IFs, loops, or whatever other constructs. Those who say soon we would want this

Re: [sqlite] SQLite version 3.8.6 coming soon

2014-08-06 Thread tonyp
src/func.c: The comment on top refers to sqliteRegisterBuildinFunctions() but the actual call seems to have been renamed to sqliteRegisterGlobalFunctions() ___ sqlite-users mailing list sqlite-users@sqlite.org

Re: [sqlite] 50% faster than 3.7.17

2014-09-20 Thread tonyp
In trying to see if the new version breaks any of my queries, I ran several of them repeatedly, and they all appear to have produced the expected output. The only thing I noticed which maybe of interest in relation to speed performance was (with .timer on) that although the first two run time

Re: [sqlite] CLI dump command ignores view dependencies

2014-10-01 Thread tonyp
On the other hand, creation of a view could ignore the dependencies, and only check them at run time. It's curious that the following sequence seems to behave this way: create view a as select 1; create view b as select * from a; select * from b; .d drop view a; .d select * from b;--Error:

Re: [sqlite] CLI dump command ignores view dependencies

2014-10-01 Thread tonyp
Exactly! -Original Message- From: John Hascall Sent: Wednesday, October 01, 2014 5:15 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] CLI dump command ignores view dependencies I think his point was: ... But, the existing situation where the first is​ illegal but

[sqlite] Shell: .IMPORT does not seem to obey .BAIL setting

2013-06-28 Thread tonyp
Trying to import data into a table the operation stops on first error (actually a rollback seems to be performed) because of column number mismatch. Why does it not follow the .BAIL ON/OFF setting? And, why rows before the error are removed? So, in .BAIL OFF mode, I expected errors to

[sqlite] v3.8 .import misbehaves

2013-08-28 Thread tonyp
When trying to load a data file with ,"", sequences (for empty field), there are quote escape related errors. Manually converting ,"", to ,, allows the file to be loaded. According to RFC4180, the double quote is an escaped quote if found inside a string. The leading quote should not be

Re: [sqlite] v3.8 .import misbehaves

2013-08-28 Thread tonyp
For example, here's a sample (header + one line of data) that fails -- a lot more lines fail but I cut it down just to show the problem: "Year","Debt","GDP1","GDP2","RGDP","dRGDP","Infl","debtgdp" "1833","","49.3275923134","","118.3483703666","","","" Then, doing .sep , .import data tab gives

Re: [sqlite] v3.8 .import misbehaves

2013-08-28 Thread tonyp
I did. I just download the precompiled binaries for Windows, and this is what I see (for that sample data file): C:\temp>sqlite3.exe SQLite version 3.8.0 2013-08-26 04:50:08 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .sep , sqlite> .import data tab

Re: [sqlite] v3.8 .import misbehaves

2013-08-28 Thread tonyp
OK, now copy the data line several times, and you'll see there are errors for several lines, unrelated to the final CRLF (which I removed this next sample). -- data -- "Year","Debt","GDP1","GDP2","RGDP","dRGDP","Infl","debtgdp" "1833","","49.3275923134","","118.3483703666","","",""

Re: [sqlite] v3.8 .import misbehaves

2013-08-28 Thread tonyp
It turns out that CRLF may have something to do with it. I can get rid of the errors, either: 1. if I replace "" with nothing, OR 2. if I save the file as Linux style (LF only). -Original Message- From: to...@acm.org Sent: Wednesday, August 28, 2013 4:16 PM To: General Discussion