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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping values

Status
Not open for further replies.

jammerdk

Technical User
Joined
Aug 16, 2001
Messages
51
Location
DK
Hi Guys

I'm trying to group some values "Rt" for use in a diagram

Rt values

3.201
3.303
3.501
3.521
3.101


and it just counts 5 seperate values but I'd like it group the values like

3.0-3.5 | 3.5-4.0
|
3 | 2

my sql looks as follows .....

TRANSFORM Count(*) AS Freqency
SELECT tblData.subject
FROM tblData
GROUP BY tblData.Subject
PIVOT tblData.Rt;

Hope you can help me on the right track
 
You may consider the Partition function.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
PHV yeah the partition works ok...but doesn't seem to support digits.

and how about the limits can those be attached to like max

TRANSFORM Count(*) AS Freqency
SELECT tblData.subject
FROM tblData
GROUP BY tblData.Subject
PIVOT Partition([tblData].[Rt]),0,100,6);

Instaid of 100 i'd like max([Rt]) instaid and instaid of I'd like Var([Rt]*2)

or is it possible?
 
Instaid of 6 I'd like Var([Rt]*2)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top