transact sql question - returning x rows

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: SqlJunkies User (User_at_-NOSPAM-SqlJunkies.com)
Date: 12/10/04


Date: Fri, 10 Dec 2004 11:41:56 -0800

HI,

I am trying to return the first 4 rows in the table on each product.
The table is set up as follows:

item date
a 1
a 2
a ...n
b 1
b 2
b 3
b ..n
...
the result should be the first 4 rows for product a, the first 4 rows for for product b and so on...

Thanks

---
Posted using Wimdows.net NntpNews Component - 
Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching.


Relevant Pages

  • Unexpected error writing metadata to file
    ... Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.dotnet.academic)
  • leave it to a Indian
    ... Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.dotnet.framework.webservices)
  • RE: UAB on compact Framework?
    ... Post Made from http://www.DotNetJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: SQL 2000 install fails - Drivers SQLAllocHandle on SQL_HANDLE_ENV
    ... Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.sqlserver.odbc)
  • No Databases in Enterprise Manager
    ... Post Made from http://www.SqlJunkies.com/newsgroups Our newsgroup engine supports Post Alerts, Ratings, and Searching. ...
    (microsoft.public.sqlserver.connect)