Re: dbaccess output formatting
Posted in 1998
Sometimes you can retain the columnar output by applying an alias to the
column name. You still only get 80 cols but you aren't wasting
space for the width of the name if the field is small.
example
select
business_opening_date b_date, last_name, first_name, initial ini
from some_table
Hope it helps
Con Woodall
Colorado State University Veterinary Teaching Hospital
cwoodall@vth.colostate.edu
970-491-1244
On Wed, 17 Jun 1998, Art S. Kagel wrote:
> Mike Morris wrote:
> >
> > Hello!
> >
> > As a new user to Informix, I wonder if there are any tools for
> > formatting the output
> > of dbaccess selects to make rows easier to read (spreadsheet-like)?
>
> Yeah, it is annoying that dbaccess switches from columnar output to
> the keyworded output of the result is wider than 80 columns. The best
> workaround is to do an unload instead and use an awk or perl script to
> format the output. You could work out a general method whereby the
> script could parse the column names from the sql file with the same
> basename as the unload file. ALternatively use the OUTPUT TO syntax
> and pipe to an awk of perl script that parses the keyworded output and
> reformats that. Look in the IIUG Software Repository, someone must
> have submitted such a set of scripts before, and no I have not. I'm
> ust too lazy to write such a beasty.
>
> Art S. Kagel
>