On Wed, May 16, 2012 at 9:30 PM, YAN HONG YE <yanhong...@mpsa.com> wrote:
> > > >when I use : > > > >.output akk.txt > >select * from dhq where qph>0; > >.output stdout > > > > command to write a txt file,I found no "\n\r" in the each line, > > when I use ultraedit to open the txt file, I found end of each line is > 0x0D, How to write "0x0D 0x0A" each line? > may be should change the sqlite3.c or shell.c? > > _______________________________________________ > Hello, I believe you may want: select *, x'0d' from dhq where qph > 0; though this will add a field separator, depending on the mode you're using. You may instead need something like (assume columns are named c1 and c2): select c1 || '|' || c2 || x'0d' from dhq where qph > 0; /*A bit confusing, but the '|' is the actual separator, and the x'0d' provides the RETURN and sqlite provides the LINEFEED */ Donald _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users