Jonathan Leslie wrote:
> I'm at a cmd.exe prompt.
>
> sqlite> INSERT INTO Files (name,contents) VALUES ('tsql.lis',X"$(od -A n -t
> x1 tsql.lis|tr -d '\r\n\t ')");
> Error: near ""$(od -A n -t x1 tsql.lis|tr -d '\r\n\t ')"": syntax error
>
> I'm trying to store the file tsql.lis as a blob, and od.exe and tr.exe are in
> my path
The entire command would have to be executed from a 'real' shell that
supports $() commands. Neither sqlite3.exe nor cmd.exe do.
With a sufficiently recent SQLite version (yours is the last one that
isn't), you can use the readfile() function:
sqlite> INSERT INTO Files (name, contents) VALUES ('tsql.lis',
readfile('tsql.lis'));
Regards,
Clemens
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users