Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Need SQL Example
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 recipients of list ORACLE-L
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:
select
sum(decode(if value between 0 and 64 then return 1 else 0)) count_of_this_bucket,
sum(decode(if value between 65 and 128 then return 1 else 0))
count_of_this_bucket,...
from
table
Thanks,
Ethan
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Jul 25 2001 - 08:57:44 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |