I peeked at the source code real quick and it looks like it just
converts the contents of the file into a bunch of SQL that is
essentially opening a transaction and doing an insert for each row
followed by a commit. This suggest I just need to format it
differently so I'll play around with that tomorrow and report back on
if I make an progress. It looks to be using prepared statements
instead of straight inserts which is what i tried to convert out of.

On Fri, May 11, 2012 at 7:22 PM, Richard Hipp <d...@sqlite.org> wrote:
> On Fri, May 11, 2012 at 10:13 PM, Joshua Shanks <jjsha...@gmail.com> wrote:
>
>> I set the separator to tab and then in the file it is
>>
>> X'somevalue'\tX'someothervalue'\n
>> X'morestuff'\tX'evenmore'\n
>>
>> but with real hex values
>>
>> According to the documentation
>>
>
> That document you quote is describing the SQL langauge, not CSV.  There is
> no way to enter BLOBs using CSV, that I know of.
>
> The ".import" command operatos on CSV, not SQL.
>
>
>>
>> BLOB literals are string literals containing hexadecimal data and
>> preceded by a single "x" or "X" character. For example:
>>
>>    X'53514C697465'
>>
>> On Fri, May 11, 2012 at 6:16 PM, Simon Slavin <slav...@bigfraud.org>
>> wrote:
>> >
>> > On 12 May 2012, at 2:01am, Joshua Shanks <jjsha...@gmail.com> wrote:
>> >
>> >> But when I try to use the .import method the values get imported as
>> >> the string "X'...." instead of the hex blob value and don't get pulled
>> >> out correctly.
>> >
>> > .import is for .csv files.  What are you putting in the .csv file to
>> express a value in hex ?  I don't think there's a way to do it.
>> >
>> > Simon.
>> > _______________________________________________
>> > sqlite-users mailing list
>> > sqlite-users@sqlite.org
>> > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>> _______________________________________________
>> sqlite-users mailing list
>> sqlite-users@sqlite.org
>> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>
>
>
> --
> D. Richard Hipp
> d...@sqlite.org
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to