More dynamic...

F

Flemming

Hi

Thank you for taking time to help me out.

I have a table containing
YearNo,*,*,*, PlayerID, Initials,*,*,*,RojterCupPoints,*,*,*

RojterCupPoints determin weither a match was won, squared og lost.

RojterCupPoints > 3 'Won
RojterCupPoints = 3 'Squared
RojterCupPoints < 0 'Lost


YearNo, PlayerID, Initials, Count of Won, Cound of Squared, Count of Lost
2006 1 FV 4 1
1
2005 1 FV 4 0
2
2006 2 KB 1 0
5
2005 2 KB 3 0
3

Thanks
Flemming
 
J

John Spencer

The SQL statement would look like the following:

SELECT YearNo, PlayerID, Initials
, Abs(SUM(RojterCupPoints>3)) as Won
, Abs(SUM(RojterCupPoints=3)) as Squared
, Abs(SUM(RojterCupPoints<3)) as Lost
FROM [SomeTable]
GROUP BY YearNo, PlayerID, Initials

If you don't know how to build an SQL statement in the SQL view, post back
for instructions on how to do this in the query design view (grid)

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
F

Flemming

Hi John

That was JUST what I needed - I'm learning to get there *S*

Thanks
Flemming


John Spencer said:
The SQL statement would look like the following:

SELECT YearNo, PlayerID, Initials
, Abs(SUM(RojterCupPoints>3)) as Won
, Abs(SUM(RojterCupPoints=3)) as Squared
, Abs(SUM(RojterCupPoints<3)) as Lost
FROM [SomeTable]
GROUP BY YearNo, PlayerID, Initials

If you don't know how to build an SQL statement in the SQL view, post back
for instructions on how to do this in the query design view (grid)

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
.

Flemming said:
Hi

Thank you for taking time to help me out.

I have a table containing
YearNo,*,*,*, PlayerID, Initials,*,*,*,RojterCupPoints,*,*,*

RojterCupPoints determin weither a match was won, squared og lost.

RojterCupPoints > 3 'Won
RojterCupPoints = 3 'Squared
RojterCupPoints < 0 'Lost


YearNo, PlayerID, Initials, Count of Won, Cound of Squared, Count of Lost
2006 1 FV 4 1 1
2005 1 FV 4 0 2
2006 2 KB 1 0 5
2005 2 KB 3 0 3

Thanks
Flemming
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top