Re: dbaccess sql output
Posted in 1997
At 12:57 AM 4/25/97 GMT, Jacob Salomon wrote:
>Terron Wright wrote:
>>
>> Is there away to force a sql dbaccess script to produce output with each
>> record being displayed horizontally? My script is:
>>
>> select * from atable>>
>> The output looks like this:
>>
>> acolumn1 test
>> acolumn2 test2
>> acolumn3 test3
>> acolumn4 test4
>>
>> I would like for the report to look like this:
>>
>> acolumn1 acolumn2 acolumn3 acolumn4
>>
>> I can do this if I do a select and put in each individual column but
>> that is time consuming. Does anyone have a solution or suggestion?
Terron,
There is no way to do this if the column size and/or column names total
more than 80 characters. You also have to account for a couple spaces
between each column. If you can specify every column in the table, I would
think it would behave the same way.
Here are a couple tricks to making it work, at least if you're CLOSE to
being able to fit in 80 columns:
1. If possible, specify substrings of columns that you know generally don't
take up the whole column width. For example, "select
acolumn1[1,30],acolumn2[1,15] ... from .."
2. If the column headers are the problem (i.e., column headers are longer
than the column values), you can use a display label. For example, "select
acolumn1 a, acolumn2 b ... ". This will display "a" instead of "acolumn1"
in the output headers.
3. Use an ace or 4GL report.
That's about it.
Ron Flannery |
rflannery@zenacomp.com | President,
ZenaComp Incorporated | Michigan Informix User Group
http://www.zenacomp.com | http://www.zenacomp.com/miug.html