Re: [sqlite] comma-separated string data

2014-04-06 Thread Hick Gunter
The vtable split method will happily accept a field from a join as in Select t.key,c.value from table t cross join cmlist on c.commalist=t.field; Virtual tables don't declare virtual indices; they return an index number and an index string from their BestIndex method. -Ursprüngliche

Re: [sqlite] Database to SQLite Population

2014-04-06 Thread danap
On 4/5/2014 12:33 PM, da...@dandymadeproductions.com wrote: The assumption is that the networked database, datasource, could be on the local lan or Internet. So am I to understand that you indeed are concerned (1) that the pipe could be slow, and (2) that the server may be heavily loaded?

Re: [sqlite] comma-separated string data

2014-04-06 Thread Dominique Devienne
On Sun, Apr 6, 2014 at 6:13 PM, Hick Gunter h...@scigames.at wrote: The vtable split method will happily accept a field from a join as in Select t.key,c.value from table t cross join cmlist on c.commalist=t.field; Thanks. Given Max's other post, I now understand that, although I'll have to

Re: [sqlite] comma-separated string data

2014-04-06 Thread Dominique Devienne
On Sat, Apr 5, 2014 at 11:46 AM, RSmith rsm...@rsweb.co.za wrote: WITH csvrec(i,l,c,r) AS ( SELECT tmpcsv.ID, 1, colCSV||',', '' FROM tmpcsv UNION ALL SELECT i, instr(c,',') AS vLen, substr(c,instr(c,',')+1) AS vRem,

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Simon Slavin
On 6 Apr 2014, at 9:01pm, to...@acm.org to...@acm.org wrote: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: insert into table values(file('path_to_binary_file')); You can represent a blob

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Petite Abeille
On Apr 6, 2014, at 10:01 PM, to...@acm.org wrote: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: You have to roll your own… e.g. blob literal + hexdump:

Re: [sqlite] SQLite encoding-specific functions

2014-04-06 Thread Richard Hipp
On Sun, Apr 6, 2014 at 4:18 PM, Ben sqlite_l...@menial.co.uk wrote: Hi all, Is there any advantage to using the encoding specific functions from the C api? For example, given a database with its encoding set to UTF-16, should I try to use the _bytes16() / _text16() functions? Or should I

Re: [sqlite] SQLite encoding-specific functions

2014-04-06 Thread Ben
On 6 Apr 2014, at 21:28, Richard Hipp d...@sqlite.org wrote: On Sun, Apr 6, 2014 at 4:18 PM, Ben sqlite_l...@menial.co.uk wrote: Hi all, Is there any advantage to using the encoding specific functions from the C api? For example, given a database with its encoding set to UTF-16, should

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Larry Brasfield
tonyp writes: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: insert into table values(file('path_to_binary_file')); Are blobs only loadable by using SQLite from C? Any ideas? I, too, thought

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Simon Slavin
On 7 Apr 2014, at 12:46am, Larry Brasfield larry_brasfi...@iinet.com wrote: I, too, thought there should be something like that. Here is the .help portion for a shell enhancement I wrote awhile ago: .blobextract TABLE COL ROW FILE ?DB? Extract DB blob to a file. Table,

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Larry Brasfield
Quoting me, Simon Slavin writes: I, too, thought there should be something like that. Here is the .help portion for a shell enhancement I wrote awhile ago: .blobextract TABLE COL ROW FILE ?DB? Extract DB blob to a file. Table, column and row must specify a blob

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Simon Slavin
On 7 Apr 2014, at 1:31am, Larry Brasfield larry_brasfi...@iinet.com wrote: Quoting me, Simon Slavin writes: Good idea for the function to create a file. However, to conform closer to expectations of how SQL works, had you thought of creating a SQLite function which accepted a filename

Re: [sqlite] Is there a way to load a blob from the shell?

2014-04-06 Thread Richard Hipp
On Sun, Apr 6, 2014 at 4:01 PM, to...@acm.org wrote: I haven't figured out how to load a blob (e.g., image) from the shell. I would think there should be something like this but can't find anything: insert into table values(file('path_to_binary_file')); Are blobs only loadable by using