League Table Help

P

Phoenix_fiames

I Am trying to make a league table for my local pool league, i have inputted
all the details of the teams and the points they have etc, I have then made
and ran a query in order to put the teams in order of points and then frame
difference.

What i would like to do now is put a field in front of the rest will simply
a list of 1 to 15, does anyone know how I can do this?

thanks for any help
 
P

Phoenix_fiames

ok this has helped a bit, what i have now is the list i am looking for but it
starts at 15 and goes down rather than 1 to 15, this is the SQL code i have
so far...

--------------------------------------------------------------------------------------------

SELECT (Select Count(1) FROM league_table T WHERE T.Points
<=league_table.Points) AS League_Position, league_table.Team,
league_table.Played, league_table.Won, league_table.W_Draw,
league_table.L_Draw, league_table.Lost, league_table.For,
league_table.Against, league_table.Frame_Difference, league_table.Points
FROM league_table
ORDER BY league_table.Points DESC , league_table.Frame_Difference DESC;


--------------------------------------------------------------------------------------------
 
P

Phoenix_fiames

OK never mind im being a dumbass lol just needed to change the < to a >.

the problem i have now is that because some teams have the same amount of
points in the league the table is reading 3,3,3,4,6,6,8 etc....

this is fine in terms of the format but is there a way of making it start at
equal 1 rather than 3?
 
P

Phoenix_fiames

ok i have solved al the problems,

thanks for the help Steve, much appreciated
 
P

Phoenix_fiames

I would now like to try and make it so the code looks at 2 different fields,
is this possible? i.e. at the moment it is giving equal firsts etc beacuse
some teams have the same amount of points, is it possible to then make it
look at frame difference as well so it simply goes from 1 to 15?
 
K

KenSheridan via AccessMonster.com

Try this
SELEC
(SELECT COUNT(*)+
FROM league_table AS
WHERE T.Points >= league_table.Point
AND (T.Frame_Difference > league_table.Frame_Differenc
OR T.Points <> league_table.Points)
AS League_Position, league_table.Team, league_table.Played
league_table.Won, league_table.W_Draw, league_table.L_Draw
league_table.Lost, league_table.For, league_table.Against
league_table.Frame_Difference, league_table.Point
FROM league_tabl
ORDER BY league_table.Points DESC
league_table.Frame_Difference DESC
Ken Sherida
Stafford, Englan

Phoenix_fiames said:
I would now like to try and make it so the code looks at 2 differen
fields
is this possible? i.e. at the moment it is giving equal firsts et
beacus
some teams have the same amount of points, is it possible to then mak
i
look at frame difference as well so it simply goes from 1 to 15

Message posted via http://www.accessmonster.co

--
 

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

Similar Threads


Top