I have a table in SQL 2005.
I have 4 columns, all DateTime
in1 out1 in2 out2
---
I want to do this: If any of the preceding values are bigger than the ones after, then the dates change back one day. Time remains the same, but it is minus 1 day.
I think I need some sorta T-SQL.. but don't know where to begin. Any insight is appreciated. Thanks.
Start Free Trial