Monday, September 9, 2013

[SQL 2012] Sql Query

[SQL 2012] Sql Query


Sql Query

Posted: 08 Sep 2013 10:16 PM PDT

I have the following data.RowId DateStamp prevStatus CurrentStatus1 6/1/2012 null 82 6/2/2012 8 93 6/8/2012 9 84 6/10/2012 8 95 6/12/2012 9 86 6/16/2012 8 97 6/19/2012 9 8Based on the above data I need to calculate the date difference between the status change between 8 to 8,the time diff between two current status 8. Time diff between rowid 1 and 3,3 and 5 ,5 and 7...Can anyone help me with the query?Thanks.

No comments:

Post a Comment

Search This Blog