Often you will find that you need to CAST the column. Check out the
difference in these three statements

select objname, objtype,
objtext,
objsize
FROM TABLE(QSYS2.OBJECT_STATISTICS('ROB', '*ALL')) AS a
order by objsize desc

select objname, objtype,
left(objtext, 5) as Short,
objsize
FROM TABLE(QSYS2.OBJECT_STATISTICS('ROB', '*ALL')) AS a
order by objsize desc

select objname, objtype,
cast(left(objtext, 5) as char(5)) as Short,
objsize
FROM TABLE(QSYS2.OBJECT_STATISTICS('ROB', '*ALL')) AS a
order by objsize desc

Then again, if it's just for display purposes and if you run these in Run
SQL Scripts instead of STRSQL you may find that you don't give a rip.

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.