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
 Transact-SQL (2000)
 Finding last 2 records

Author  Topic 

mik2000
Starting Member

1 Post

Posted - 2002-12-03 : 07:22:27
Hi all,

i have a table called tblOnAir
including these 2 columns intProductID,datOnAir

Looks liek this:
intProductID-----datOnAir
125---2002-12-01
125---2002-12-02
125---2002-12-03
126---2002-11-30
126---2002-12-01
126---2002-12-02
126---2002-12-03

So how can I get the last 2 onAir Entries of each Product
like

125---2002-12-02
125---2002-12-03
126---2002-12-02
126---2002-12-03


THX Mik2000


Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2002-12-03 : 07:27:06
There is some discussion of various techniques here.

Jay White
{0}
Go to Top of Page
   

- Advertisement -