|
|
Archives of the TeradataForum
Message Posted: Thu, 18 Nov 2004 @ 09:58:37 GMT
Subj: | | Re: CAST instead of CASE |
|
From: | | Duane, Brian |
no JOINs, no CAST, no CASE
select last_name
,salary_amount (integer) as sal_amt
,trim((sal_amt/500)*500)||'-'||trim((sal_amt/500)*500+499)
as Range
from employee
order by sal_amt;
last_name sal_amt Range
Phillips 24500 24500-24999
Crane 24500 24500-24999
Hoover 25525 25500-25999
Rabbit 26500 26500-26999
Kanieski 29250 29000-29499
Stein 29450 29000-29499
Lombardo 31000 31000-31499
Ryan 31200 31000-31499
Machado 32300 32000-32499
| |