I have been using SQLite for a small data-processing application.
I am hoping to get quote mode output with a field separator that is not a 
comma.Many thanks,
Pamela------------------
Problem

Quote mode output ignores separator string
Background
https://www.sqlite.org/cli.html5. Changing Output Formats
...
In "quote" mode, the output is formatted as SQL literals. Strings are enclosed 
in single-quotes and internal single-quotes are escaped by doubling. Blobs are 
displayed in hexadecimal blob literal notation (Ex: x'abcd'). Numbers are 
displayed as ASCII text and NULL values are shown as "NULL". All columns are 
separated from each other by a comma (or whatever alternative character is 
selected using ".separator").
...

Demonstration

SQLite version 3.21.0 2017-10-24 18:55:49
Enter ".help" for usage hints.
sqlite> create table tbl1(one varchar(10), two smallint);
sqlite> insert into tbl1 values('hello!',10);
sqlite> insert into tbl1 values('goodbye', 20);
sqlite> insert into tbl1 values(null, 30);
sqlite> select * from tbl1;
hello!|10
goodbye|20
|30

sqlite> .separator #
sqlite> select * from tbl1;
hello!#10
goodbye#20
#30

sqlite> .mode quote
sqlite> select * from tbl1;
'hello!',10
'goodbye',20
NULL,30


Expected Output

sqlite> select * from tbl1;'hello!'#10
'goodbye'#20
NULL#30

sqlite> .show
        echo: off
         eqp: off
     explain: auto
     headers: on
        mode: quote
   nullvalue: ""
      output: stdout
colseparator: "#"
rowseparator: "\n"
       stats: off
       width:
    filename: data.db3

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

Reply via email to