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 |
laddu
Constraint Violating Yak Guru
332 Posts |
Posted - 2011-04-28 : 10:28:52
|
need help to write a query to pull the below datadifference betweenRIinvitationCreatedDate in RInvitation tableand UsertRegistrationCompletedDate from User tableand Join these two tables with RInvitation.RInvitationLoginID on User.UserID |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-04-28 : 10:41:15
|
You've almost said itselect u.UserID, u.UsertRegistrationCompletedDate - r.RIinvitationCreatedDate from RInvitation rjoin User uon u.UserID = r.RInvitationLoginID==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
laddu
Constraint Violating Yak Guru
332 Posts |
Posted - 2011-04-28 : 11:16:47
|
Thank you,actually I am looking the difference in minutes, |
 |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-04-28 : 11:20:58
|
select u.UserID, datediff(mi,r.RIinvitationCreatedDate ,u.UsertRegistrationCompletedDate)from RInvitation rjoin User uon u.UserID = r.RInvitationLoginID==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|