× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Gary

FYI - you can use the data type as a function - an implicit CAST

For count(*) use

CAST(count(*) as DEC(9))

or

DEC(count(*), 9)

whatever number of digits you want.

For the sums, you need to rearrange the parentheses, so the AS DEC(31) moves out at least one level, I think. And you can use something shorter than 31 in each case - whatever you know will fit. Again, I'm not sure why, but I like the use of the data type instead of CAST. YPYM-YTYC --- just made that one up, maybe?

HTH

Vern

At 09:18 PM 4/21/2003 -0700, you wrote:
Hi,

Does anyone know how to reduce the output size these SQL fields
of:
Count
ST_Size
ST_ALLOCSZ

Currently they are taking up on the screen
Count               20 pos
ST_Size           44 pos
ST_ALLOCSZ  41 pos

It would be much more readable on the screen if they occupied less
positions.

Thank you,

Gary Kuznitz

-snip-


> SELECT
>         COUNT(*) AS "Number of Objects",
>         SUM(CAST(st_size AS DEC(31))) AS "File Size",
>         SUM(CAST(st_allocsz AS DEC(31))) AS "Allocated Size",
>         SUBSTR(dirname,1,200) AS "Directory"

-snip-





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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

This mailing list archive is Copyright 1997-2024 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.