RE: dbaccess output formatting
Posted in 1998
Art 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
>
>
Tab-delimited files go into Excel very easily. Try:
UNLOAD TO "datafile.xls" DELIMITER " " -- that's a tab-character which =my
SELECT * FROM customer; -- mail-client won't allow me to =type!
This works like a charm when I download to my Macintosh - opens in Excel =
(and others) no problems. Windoze version should be the same.
cheers
RET
+------------------------------------------+
| Richard Thomas |
| DBA - Marketing Information Systems |
| Optus IT |
| email: richard_thomas@yes.optus.com.au |
| Ph: +61 2 9342 7188 |
| "My opinions are my opinions" |
+------------------------------------------+