Re: command line isql row size
Posted in 1992
In article <9154@emory.mathcs.emory.edu> kristen.m.altman@ccd.harris.com (Kristen Altman) writes:
>Infomrix fans,
>
>When using the command line version of isql (i.e. isql dbname -), the
>data is returned in the following way when the length of the data header
>is within the bounds of the screen width:
>
>col1 col2 col3 ...
>
>val1 val2 val3 ...
>
>When the length of the data header is greater than the width of the screen,
>the data looks like the following:
>
>col1: val1
>col2: val2
>col3: val3
>
>If anyone has run across this problem, is there any way to make the data
>always be returned in the first format I described?
>
>Thanks in advance,
>Kristen
>
Good question, I don't know the answer but it is a good question. I would
like some kind of option that would say to I-SQL "Compress it, truncate it,
forget about spaces between the fields, do whatever you have to do, but
put it all on one line. Please."
You can sometimes buy yourself a little more space by using an alias so
that the column header is no wider than the data in the field - a wide
header will force I-SQL to reserve more space for the field. eg
select state_code, country_code from state
will return
state_code country_code
CA USA
QP CAN
whereas
select state_code sc, country_code cc from state
will return
sc cc
CA USA
QP CAN
and obviously if you have other fields this might make the difference
between being able to fit the whole record on one line, and not.
I daresay I am only stating the obvious though.
Paul