View Single Post
Old 09-13-2000, 03:53 AM   #3
mosquito
SQL nutcase
 
mosquito's Avatar
 
Join Date: Sep 2000
Location: Belgium
Posts: 1,136
Send a message via AIM to mosquito
you could try:
select top 5 * from tablename

This works for SQLServer7. Don't know for Oracle or Access,
I assume that it works for access.

to do the sum thing, you could use a statement like this
select top 2 playername, sum(score)
from t_link l
inner join t_player p
on p.player_id = l.player_id
group by player


I assumed that you have 3 tables

t_player (player_id, playername,...) ==> player_id = PK
t_holes (hole_id,holedescription,...) ==> hole_id = PK
t_link (player_id,hole_id,score) ==> player_id + hole_id = PK


I hope this is what you wanted
mosquito is offline   Reply With Quote