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)
 sql query problem with new table

Author  Topic 

ind_sql
Starting Member

16 Posts

Posted - 2004-09-23 : 17:16:37
i have a table

ID name sequence hobby

1 A 1 chess
1 A 2 football
1 A 3 baseball
1 A 4 hockey
1 A 5 basketball
2 B 1 football
2 B 2 baseball
2 B 3 athletics
2 B 4 chess
3 C 1 nothing
3 C 2 everything
3 C 3 noteverything

So i want the result according to the max(sequence) as follows. The result i want is
ID NAME SEQUENCE HOBBY
1 A 5 basketball
2 B 4 chess
3 C 3 noteverything

I hope you understand the query i want.
Thanking you in anticipation

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-09-23 : 17:17:42
That's the same question as before with different data. Please post in the other thread how far you got with Corey's query.

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=40404

Tara
Go to Top of Page
   

- Advertisement -