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, 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

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 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

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

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 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
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] SQLite encoding-specific functions

2014-04-06 Thread Ben
On 6 Apr 2014, at 21:28, Richard Hipp wrote: > On Sun, Apr 6, 2014 at 4:18 PM, Ben 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

Re: [sqlite] SQLite encoding-specific functions

2014-04-06 Thread Richard Hipp
On Sun, Apr 6, 2014 at 4:18 PM, Ben 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? > >

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] Is there a way to load a blob from the shell?

2014-04-06 Thread Simon Slavin
On 6 Apr 2014, at 9:01pm, 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

Re: [sqlite] comma-separated string data

2014-04-06 Thread Dominique Devienne
On Sat, Apr 5, 2014 at 11:46 AM, RSmith 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] comma-separated string data

2014-04-06 Thread Dominique Devienne
On Sun, Apr 6, 2014 at 6:13 PM, Hick Gunter 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

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

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