On 19 Sep 2012, at 6:43am, YAN HONG YE <yanhong...@mpsa.com> wrote:

> sqlite3 -html -header t9_engine.db "select id,partnumber,pic,pcs from engine 
> where id>7;" >> mm.html
> 
> the pic result is "c:\abc.jpg"...
> but I wanna the result is 
> "<img src=\" c:\abc.jpg \" width=120px>"

You can use '||' to add strings together.  So it could be

SELECT id,partnumber,'<img src=\"'||pic||'\" width=120px>',pcs FROM engine 
WHERE id>7

But this includes the characters '<' and '>' and I think the command line will 
try to interpret them.  You will need to escape those characters, depending on 
which shell you are using.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to