April 21, 2004 at 9:20 pm
Hi
I need to produce a report that groups and then reports on particular number sets.
How do you group number sets such as:
0 <= 999,999
1,000,000 <= 1,190,000
>= 1,190,001 +
I would appreciate any help in this matter.
Brian
Thanks Brian
You are never an expert, you are always learning!April 22, 2004 at 2:57 am
divide your numbers, e.g. by 10,000, take the integer of the result and group by that.
April 22, 2004 at 10:56 pm
Why not just use a case statement? ie:
SELECT
CASE WHEN (X < 100) THEN 1
WHEN (X >= 100 AND X < 1000) THEN 2
ELSE 3 END [MyColumn]
...
GROUP BY
CASE WHEN (X < 100) THEN 1
WHEN (X >= 100 AND X < 1000) THEN 2
ELSE 3 END
Something like that at least...
April 23, 2004 at 12:38 am
Thanks that worked!!
Thanks Brian
You are never an expert, you are always learning!Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply