You are here: How To Select a Certain Limited Number of Rows Per ID « MsSQL Server « IT news, forums, messages
How To Select a Certain Limited Number of Rows Per ID

Posted by unabogie on 09/18/06 23:19

I have a table with entries tied to a membership database. The problem
is that I want to select a limit of sixteen entries per member, per
day, where some members have 16+ entries per day.

I have this so far ( which I've simplified for this post)

SELECT dbo.members.firstname, dbo.members.lastname,
dbo.entries.gameDay
FROM dbo.members INNER JOIN
dbo.entries ON dbo.members.memberID =
dbo.entries.memberID

If it's day 5, each member should have 80 total.

How can I change this to select only 16 entries for each member, making
sure it's 16 per day based on dbo.entries.gameDay?

Thanks for your help.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация