[SQL 2012] 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. |
You are subscribed to email updates from SQLServerCentral / SQL Server 2012 / SQL 2012 - General To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment