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)
 Need Query Help

Author  Topic 

sreenu9f
Yak Posting Veteran

73 Posts

Posted - 2008-11-24 : 15:10:29
I have a table which looks like this


Acct.No Type DateTime User
FN10000204149 P 11/20/08 10:20 GUPRA
FN10000204229 N 11/20/08 10:30 GUSTV
FN10000204229 N 11/20/08 10:40 CALPER
FN10000204230 N 11/20/08 10:30 GUSTV
FN10000204230 N 11/20/08 10:40 CALPER
FN10000204230 N 11/20/08 10:45 GUSTV
FN10000204230 P 11/20/08 10:50 EDPA

the query should look for the MAX(Time) and who the user was and print the result as below.

Acct.No Type User
FN10000204229 N 11/20/08 10:40 CALPER
FN10000204230 P 11/20/08 10:50 EDPA

Please provide any suggestions or clues.

Thanks.

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-24 : 15:15:22
Why new thread?
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=114969
Go to Top of Page

sreenu9f
Yak Posting Veteran

73 Posts

Posted - 2008-11-24 : 15:30:25
Hi Sodeep; I have to work on two servers one of them is 2000 and the function Row_Number doesn't work in 2000.

Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-24 : 15:32:44
What about the output from Lamprey and Me?
Go to Top of Page
   

- Advertisement -