2012/2/9 rod <crimson.blu...@gmail.com>:
> My apologies if this question should be directed to some other list.
>
> I'm looking for a better way to printout the:
> Column Headers,
> followed by the table contents -
> in comma separated value (csv) format
> from a SELECT statement:
>

On Fri, Feb 10, 2012 at 3:35 PM, Alexey Pechnikov <pechni...@mobigroup.ru>wrote:

> See pragma table_info
>
>

First  a few typo  corrections, I had written comma separated values(csv) I
 had meant  "tab sep. val. (TSV)" hence the TCL code:
join  $list  "\t"

Alexey suggest  I research table_info.

I think I already have all the info about the table, as produced by the
select statement,  that I need.  This info is contained within row(*): the
column names for the select columns being executed by 'select'.   I don't
see any added benefit of
pragma table_info.


I should have presented a more generic case  of a select statement, one
that contains a subset of the available columns not * (ie all the columns)
Eventually I would like a to be able to add a procedure to the select
script that prints out a tab separated table of   column headers and table
values for a generic select statement.

Something like:

sql eval {Select col_1, col_2, col_8, col_4  from generic_table } rows {
procedure_that_prints_tsv_and_the_column_names $rows
}

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

Reply via email to