[sqlite] CSV excel import

2015-08-01 Thread Jean Chevalier
Or use read.csv() followed by dbWriteTable from package RSQLite. Or read.DIF() as the case may be (the DIF format for spreadsheets being simpler than XLS). Today, Gabor Grothendieck wrote: > > Here is how to do it in R. Download, install and start R and then > paste the following code into R.

[sqlite] Using SQLite as a column-store database?

2015-07-29 Thread Jean Chevalier
Would it be realistic to pretend to use SQLite as a column-store database by leveraging ALTER TABLE ... ADD COLUMN massively and to expect better performance? Suppose that instead of defining a table like CREATE TABLE (key, c1, c2, ... cn) I defined it as CREATE TABLE (key) followed by n-times

[sqlite] Importing CSV empty strings as nulls?

2015-07-29 Thread Jean Chevalier
Question: I wished to import a CSV file representing nulls as empty strings (nothing between the commas). I observed that the .import command by default imports those as empty strings. A minimalistic example: Let's create a table T with a single column (c) and a file containing only one new

[sqlite] cross-database transaction

2015-07-24 Thread Jean Chevalier
Presumably you've already made this work for a transaction involving two tables in the same database? Have you tried attaching a second database with Attach Database and using a similar logic? In other words, is your question about using multiple databases in a transaction, or about how to

[sqlite] Implement floor and ceil functions

2015-07-24 Thread Jean Chevalier
Floor and Ceil can be dynamically loaded. Check last entry here: http://www.sqlite.org/contrib Today, Artem Skoretskiy wrote: > > Hi all, > > According to the documentation https://www.sqlite.org/lang_corefunc.html > SQLite does not provide some basic math functions such as floor and ceil. >

[sqlite] SQLite site down

2015-07-22 Thread Jean Chevalier
Hi Richard, Could you check that a bug report I emailed to you two days ago containing two attachments has reached you? Double-checking in case there might have been a mail malfunction or the original email got caught by a spam filter. Jean

[sqlite] How to perform regex on string

2015-07-16 Thread Jean Chevalier
Have you looked at https://www.sqlite.org/src/artifact/af92cdaa5058fcec ? Simon wrote: | | Do you have to use regexp ? The following works: | | sqlite> SELECT replace('The time is %s.', '%s', strftime('%s','now')); | The time is 1437054006. | | | On 15 Jul 2015, Rick asked: | > | > Is there a

[sqlite] Question about getting size of stored data

2015-07-11 Thread Jean Chevalier
Alternatively someone creates a couple of functions like Oracle's VSIZE and DUMP and donates them to the community, maybe as part of a loadable extension (I'd do but I haven't got the skills) http://stackoverflow.com/questions/24240087/oracle-numberp-storage-size -- Original message -

[sqlite] Separator and mode switching

2015-07-11 Thread Jean Chevalier
Using the shell tool, I've found that after switching to certain modes that change separator values, the original separator settings are not restored when I switch back to the previous mode, or only one of them is. This has the effect that after switching back to the original mode it does not

[sqlite] Reader.GetBytes() - when is a byte not a byte?

2015-07-03 Thread Jean Chevalier
In SQLite, every value you store is stored alongside its type. This is unlike other databases where the column determines the type and every value stored against it share it. In SQLite you could have a table in which all value types as stored contradict all column types as declared, if you so

[sqlite] Reader.GetBytes() - when is a byte not a byte?

2015-07-02 Thread Jean Chevalier
It's not mandatory to use x'' notation to insert into a blob, when one can use cast. The following should return blob content correctly without explicitly lying it down as Hex: sqlite> create table T (c blob check(typeof(c) = 'blob')); sqlite> insert into T values ( cast('x y z' as blob) );

[sqlite] Reader.GetBytes() - when is a byte not a byte?

2015-07-02 Thread Jean Chevalier
Please provide your code context, as in, http://stackoverflow.com/questions/10746237/sqlite-in-c-sharp-throws-invalidcastexception-using-getbytes Today, Bill wrote: > > All, > Below is a .dump of the database I'm working with. I can use > GetBytes() successfully on all the BLOB columns except >

[sqlite] Question about getting size of stored data

2015-06-30 Thread Jean Chevalier
Today, Michael asked: > > I tried the following, but it returns different sizes every time. But my test data is the same so I think it should have the same size. > ... > Can you help me to get the size of 1 row? Is it possible? > Hi Michael, Have you read all about the SQLite Database File

[sqlite] SQLite (1.0.97) access via LAN

2015-06-19 Thread Jean Chevalier
Try substituting all backslashes with forward slashes, i.e., file:/PC-Name/C/FolderName/data.db If that doesn't work, maybe there is something going on with URI support in the 64bit build you're using. Takashi Fukuda wrote: > > For x64 target compilation with

[sqlite] Likelihood() in Left Join affecting results

2015-06-18 Thread Jean Chevalier
The likelihood() function, which should help select a query plan but otherwise be logic-neutral, nevertheless seems to affect results returned by a Left Join, when used as part of the join condition, possibly in other circumstances. With the following sample data, the two SELECT queries should

[sqlite] Automatic column aliasing, SELECT vs VALUES

2015-06-17 Thread Jean Chevalier
ALUES() seemed to do before, although in this case there is no VALUES: CREATE TABLE y AS SELECT * FROM x; - Original message - From: Jean Chevalier <jcheval...@gmx.net> To: sqlite-users at mailinglists.sqlite.org Subject: Automatic column aliasing, SELECT vs VALUES Date: Wed, 17 Jun 2015 22:0

[sqlite] Automatic column aliasing, SELECT vs VALUES

2015-06-17 Thread Jean Chevalier
I read that VALUES(expr-list) means the same as SELECT(expr-list), but apparently not with regards to the metadata that's sent out along with the values. If I issue these two commands, in one case I end up with column names "", ":1", ":2" (sequential), and in the other I end up with "1", "2",

[sqlite] Possible bug in shell .open command?

2015-06-17 Thread Jean Chevalier
The aftermath... dir *. /x /b h8 08 @_8 0o8 hN Q N xa8 b8 0f8 10 soubor?, 14,336 bajt?

[sqlite] Possible bug in shell .open command?

2015-06-17 Thread Jean Chevalier
I took that the .open command could be issued as ".open" to open a new in-memory database and ".open ''" (followed by a pair of single quotes) to open a new unnamed temporary file database. I wonder what is going on here: After issuing a short combination of these commands with/without putting

[sqlite] Mozilla wiki 'avoid SQLite'

2015-06-15 Thread Jean Chevalier
ct out their normal urges in unnatural ways." And by God, have I seen plenty of that in places where I've worked? Coming from people of all ranks. J.B. Nicholson-Owens wrote: | | Jean Chevalier wrote: | > | > Somewhat contradictory the Mozilla Foundation being a member of the | > SQ

[sqlite] Mozilla wiki 'avoid SQLite'

2015-06-14 Thread Jean Chevalier
Somewhat contradictory the Mozilla Foundation being a member of the SQLite Consortium while their performance wiki prominently features a warning to developers against using SQLite allegedly for performance reasons. Guard me from my friends...

[sqlite] Awesome SQLite List - Collection of SQLite Goodies Started - Contributions Welcome

2015-06-03 Thread Jean Chevalier
Check out cubeSQL Admin from sqlabs.com.? This turns SQLite into a server; you can use the cubeSQL ODBC driver to connect to it from other computers, among other methods. [1] https://github.com/planetopendata/awesome-sqlite