I am using the command line shell SQLite 3.14.2 2016-09-12. I'm working with mainframe data in a fixed format.
I would like to use .mode column to create my output text file in a fixed layout. I set all my column widths using .width. I then output my data to a file. Unfortunately, there are two blanks separating each column, space I don't want to be there. The .separator command does not provide any mechanism for turning it off. Is there a way? I realize there is a printf function available. However, it appears that output values must come from a table column, where as below, I could use case statements in the sql select of the data. Any suggestions? I think I am overlooking a .separator option that says "don't put spaces between output columns". I assume that John McKown has faced this already, given his mainframe pedigree. Thanks for your time, dvn Sample output: "H 0NZOX0001687395 83501 5827 "... .mode column .width 1 15 5 4 2 1 4 4 1 5 1 10 10 10 1 20 20 15 1 10 20 20 50 50 50 50 50 25 2 8 003 006 009 .output vo_pwprep.txt select recid, z_num, zip, zip4, dpbc, ckdig, cart, lot, lot_order, walk_seq, walk_seq_bic, case when piecerate in ('AF','RF') and version_id = '81' then '81' else segment end as segment, version_id, message, seed, seed_id, seed_key, planet, ocr_acr, priority, keycode, custno, name, title, firm_id, addr1, addr2, city, state, seq_number, srvc_type, imb_mid, imb_serial from address_txt ; _______________________________________________ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users