When I do a select on the table, the displaying of the "body"
column makes it basically unreadable for more than one line. What I'd
like to be able to do is something like:
select uid,time,type,rtrim(body) from flpwebmsgq;
This would make it much more readable We also have a bunch of
other tables where the column is defined as VARCHAR(254) because there
is the possibility of larger data in the future, but currently we are
only using a portion of the column's width. So a solution to the
above problem would be helpful for a lot of different tables when we
are trying to verify test results or debug a problem.
Any help is appreciated.
Kyle
"Kyle" <Kyle...@hotmail.com> wrote in message
news:a692bab1.0309...@posting.google.com...
PM
> Hi,
>
> On an AIX box using DB2 version 7.1, I've got a table with one
> particular column which may (infrequently) be quite large. The table
> description is as follows:
>
> db2 => describe table flpwebmsgq
>
> Column Type Type
> name schema name Length
> Scale Nulls
> ------------------------------ --------- ------------------ --------
> ----- -----
> UID SYSIBM INTEGER 4
> 0 No
> TIME SYSIBM TIMESTAMP 10
> 0 No
> TYPE SYSIBM VARCHAR 32
> 0 No
> BODY SYSIBM VARCHAR 15000
> 0 No
>
> 4 record(s) selected.
>
> When I do a select on the table, the displaying of the "body"
> column makes it basically unreadable for more than one line. What I'd
> like to be able to do is something like:
>
> select uid,time,type,rtrim(body) from flpwebmsgq;
Pipe the output into "less":
db2 "select uid,time,type,rtrim(body) from flpwebmsgq" | less -S
Then you can use the arrow keys on the keyboard to scroll up/down and
left/right to view the complete output.
--
Knut Stolze
Information Integration
IBM Germany / University of Jena