Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Select First Row Each Group

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-11-13 : 19:25:47
Jafedo writes "I have a table with following rows :

Code1 Code2 Date
----- ----- ----------
A 1 2001-10-06
A 2 2001-10-05
A 3 2001-10-04
B 1 2001-10-03
B 2 2001-10-02
C 1 2001-10-01

I want to appear only first rows (with all columns) each group on 'Code1'

How does I write my 'select' command to retrieve rows that i want?""
   

- Advertisement -