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.
Author |
Topic |
sreenu9f
Yak Posting Veteran
73 Posts |
Posted - 2010-05-11 : 13:16:44
|
I have a table which looks likeVisitID DateTime ResponseFN10000061559 1/19/07 4:49 PM 1FN10000166954 8/17/06 2:14 PM 1FN10000198818 8/30/06 1:04 PM 1FN10000201615 9/29/06 5:45 PM 1FN10000208586 11/1/06 12:24 PM TrfFN10000216866 8/23/06 12:19 PM ColmbFN10000217653 12/22/06 10:00 AM FIELD HOMEFN10000227122 8/24/06 10:39 AM HABFN10000235855 8/11/06 11:00 AM lhcFN10000235855 8/11/06 11:29 AM wphi would like to have the output as only one row for each visitID with Response for the Max(DateTime). for example there are two rows for VisitID FN10000235855 with different DateTimes and different responses. i would like to have only one row with max date time in this case 8/11/06 11:29 Am with response field being wph.please suggest.Thanks, |
|
sreenu9f
Yak Posting Veteran
73 Posts |
Posted - 2010-05-11 : 13:18:01
|
sorry posted on a wrong forum will open this in TSql 2005. |
|
|
|
|
|