Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
nick604r
Starting Member
3 Posts |
Posted - 2006-12-13 : 12:57:21
|
| sorry i posted this in the tsql forum by accident, here's a repostI've got a query that I need help with. This is a simplified version of the table I have.sellerID, orderID, time1, time2, time3, time41, 1b1, 11:30 11:35 11:40 11:451, 1b2, 11:50 11:55 12:00 12:051, 1b3, 12:10 12:15 12:20 12:252, 1c1, 11:20 11:25 11:30 11:352, 1c2, .... and so onWhat I want is a datediff between time4 of the first OrderID to time1 of the next orderID within the same sellerID.What I want is the following outputsellerID, orderID, timeDif1(time4-time1 of nextrow), timeDif2(time2-time1), TimeDif3(time3-time2), timeDif4(Time4-time3)1, 1b1, 10mins, 5mins, 5mins, 5minsAny help would be appreciated!! THanks |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
|
|
|
|
|
|
|