Re: [sqlite] Update field from standard input with sqlite3 command line utility

2013-08-27 Thread James K. Lowden
On Mon, 26 Aug 2013 20:01:08 +0200 Clemens Ladisch wrote: > sqlite3 database.db "UPDATE table1 SET column3 = CAST(x'$(hexdump -v > -e '1/1 "%02x"' file.xml)' AS TEXT) WHERE column1 = 'some name';" $ hexdump -C input 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f

Re: [sqlite] Update field from standard input with sqlite3 command line utility

2013-08-26 Thread Clemens Ladisch
luis montes wrote: > I'm trying to do a simple database update from a bash script. It seems > to me that I should be able to do something like this from the command > line: > > cat file.xml|sqlite3 database.db 'update table1 set column3=? where > column1="some name";' Escaping arbitrary data in

Re: [sqlite] Update field from standard input with sqlite3 command line utility

2013-08-26 Thread Niall O'Reilly
On 26 Aug 2013, at 16:14, luis montes wrote: > It seems to me that I should be able to > do something like this from the command line: > > cat file.xml|sqlite3 database.db 'update table1 set column3=? where > column1="some name";' > > That's it, I'm trying to update column 3 on a particular

[sqlite] Update field from standard input with sqlite3 command line utility

2013-08-26 Thread luis montes
I'm a SQL novice, and occasional sqlite user. I'm trying to do a simple database update from a bash script. It seems to me that I should be able to do something like this from the command line: cat file.xml|sqlite3 database.db 'update table1 set column3=? where column1="some name";' That's it,