TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rohatash Kumar
Tech Writer
23.6k
34.8m
Comparing Data in Two Consecutive Rows in SQL Server
Aug 21 2012 11:42 PM
Suppose my database table is looks like below table,
Id Name Status
2012-07-16 A Login
2012-07-16 A Logout
2012-07-16 A Login
2012-07-16 A Login
2012-07-16 A Logout
In the above table, Two consecutive rows have the same name login then only last row should be display in the output table. AND I want a output like that:
Date Name Status
2012-07-16 A Login
2012-07-16 A Logout
2012-07-16 A Login
2012-07-16 A Logout
How can I do this? Please help me.
Reply
Answers (
5
)
Send Database Mail in SQL Server
Index Configurations of Table