Ethan,
Is it possible for you to use your function instead of decode? I guess
that way you can evaluate situations wherein decode would not work. That way
you could have it work on older versions of Oracle.
Shailesh
-Original Message-
Sent: Tuesday, July 24, 2001 1:29 PM
To: Multiple
Thanks for the SQL all. Here is the result. You can change and use this
with DBA_FREE_SPACE also if your not using uniform extent sizes to help
determine level of fragmentation.
select tablespace_name,
count(*) f_count,
sum(decode(sign(round(bytes/1024) - 64), 1, 0, 1)) f_below_64
Sent by: To: [EMAIL PROTECTED]
root@fatcity.cc:
com Subject:
Yeah that one is great, thanks. - Ethan
-Original Message-
Sent: Tuesday, July 24, 2001 11:28 AM
To: Multiple recipients of list ORACLE-L
"Post, Ethan" wrote:
>
> Anyone got a good example of flipping a range of values into columner
> buckets. I have done this in the past but my solut
"Post, Ethan" wrote:
>
> Anyone got a good example of flipping a range of values into columner
> buckets. I have done this in the past but my solutions always seem so
> convoluted, it seems I have seen more elegant examples in the past. I want
> to use decode so it will run on older versions of
Ethan,
Try this:
-- LeftMost bin:
SUM(DECODE(SIGN(lim_val0 - column_value),1,1,0,1,0)) -- less then
lim_val0
-- Middle bins:
SUM(DECODE(DECODE(SIGN(lim_val1 - column_value),-1,0,1), 1 ,
DECODE(SIGN(lim_val0 - column_value),-1,1,0), 0)) -- for
(lim_val1-lim_val0) bin
SUM(DECODE(DECODE(SI
I think you use sign eg
the above will work for integers at least and just requires the the lower
and upper values of the ranges plugged in. I'm sure it could be adapted for
real numbers but hopefully this will do
select sum(decode(sign(:value - (0-1)),1,decode(sign(:value -
(64+1)),-1,1,0),
Anyone got a good example of flipping a range of values into columner
buckets. I have done this in the past but my solutions always seem so
convoluted, it seems I have seen more elegant examples in the past. I want
to use decode so it will run on older versions of Oracle.
Pseudo Example:
sele