Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Datediff between two ids of same record

Status
Not open for further replies.

simma

Programmer
Sep 11, 2001
398
US
Hello
I need to take datediff from consequetive rows in resultset
For example datediff between dates corresponding to seqno 45 and 200 (datediff would be 34).Pleasae advice .I gave up
Thanks

Lnumber lid seqno date
5000037973 68906 45 2003-06-17 00:00:00.000
5000037973 68909 200 2003-07-21 00:00:00.000

Sql
select A.lnumber,B.lid,B.seqno,B.date
from table A
left outer join
table B
on A.aid=b.aid
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top