Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Assigning values for multiple deciles

Status
Not open for further replies.

aredman

Technical User
Aug 30, 2005
2
US
Hello all,

I am in the process of trying to assign values to my decile figures but seem to have a problem. I need to set max and min limits for each decile. Any help is appreciated.

ex:
sel
TRAN_NBR
,quantile (5, TRAN_NBR) as Decile

from
DQ_1DAY

When I run this my decile results are too sporadic.

Thanks
 
If you really want to assign your own limits then you'll have to use a CASE:

sel
TRAN_NBR
,case
when TRAN_NBR < 222 then 1
when TRAN_NBR < 444 then 2
when TRAN_NBR < 555 then 3
when TRAN_NBR < 999 then 4
else 5
end
from
DQ_1DAY

Dieter
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top