×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Assigning values for multiple deciles

Assigning values for multiple deciles

Assigning values for multiple deciles

(OP)
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

RE: Assigning values for multiple deciles

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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close