Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

sql server 2000:Get the consecutive rows .I have to compare the consecutive rows.

$
0
0

Below is my table phase structure

ID Project_ID Phase                                                                                                      Updated on                      Updated by

65  220         PMT/HLBRs,ROM,BUS CASE APPROVAL,Detailed Requirements,Development 2013-09-03 17:45:54.000 D\sxmalla

49  220         PMT/HLBRs,ROM,BUS CASE APPROVAL,Detailed Requirements                     2013-09-02 17:07:55.000 D\sxmalla

47  220         PMT/HLBRs,ROM                                                                                      2013-09-02 17:07:25.000 D\sxmalla

I have to compare the top row with top-1 row and display the most recent change that is in top row.Same for row wise.

Something like this should display the result:

Phase                                                            Updated On                       Updated By

Development                                                  2013-09-03 17:45:54.000  D\sxmalla

BUS CASE APPROVAL,Detailed Requirements    2013-09-02 17:07:55.000 D\sxmalla

PMT/HLBRs,ROM                                              2013-09-02 17:07:25.000 D\sxmalla

Please help me on this.I have been trying to get the result from couple of days.........

               


Viewing all articles
Browse latest Browse all 23857

Trending Articles