Home How can I get the differences between the orderstop and the orderstart in the next column?
Reply: 0

How can I get the differences between the orderstop and the orderstart in the next column?

user1155
1#
user1155 Published in July 17, 2018, 7:56 am

How can I get the differences between the orderstop and the orderstart in the next column?

For example row 1 has orderstop of 1/31/207 I want to count the day between the next start date 1/26/2017 I know they are overlaps.

ID  OrderStart  OrderStop
132 4/14/2006   1/31/2007
132 1/26/2007   3/14/2007
132 2/1/2007    3/2/2007
132 3/2/2007    3/14/2007
132 3/14/2007   1/8/2010
132 11/26/2008  1/20/2011
132 1/8/2010    7/14/2010
132 7/14/2010   8/15/2012
132 8/15/2012   1/17/2013
132 1/17/2013   3/22/2013
132 3/21/2013   5/2/2013
132 5/2/2013    8/2/2013
132 5/22/2013   8/2/2013
132 7/29/2013   3/6/2014
132 3/5/2014    7/16/2014
132 7/16/2014   6/19/2015
132 8/21/2014   6/19/2015
132 6/19/2015   4/1/2016
132 6/25/2015   9/9/2015
132 4/1/2016    5/3/2016
132 5/3/2016    7/27/2016
132 8/15/2016   11/2/2016

I am trying to accomplished the below how can I create a sql statement that can accomplish this?

132 4/14/2006   1/31/2007
132 1/26/2007   4/1/2016
132 4/1/2016    7/27/2016
132 8/15/2016   11/2/2016
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.603371 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO