how to get table row value of same username,same date ,but different time to get single query.

Posted by Ramsakthi under Sql Server on 11/9/2012 | Points: 10 | Views : 771 | Status : [Member] | Replies : 1
I want to select any rows that have another row where UserName is the same,date is the same, but the time is different in sql server.how to get table value of same username,same date ,but different time to get single query in sql server from the single table.

Ramu.R


Responses

Posted by: Krv on: 11/15/2012 [Member] Starter | Points: 25

Up
0
Down
select * from tablea a join tablea b
on a.username=b.username and a.date=b.date
where a.time<>b.time

Thanks,
R.Vasanth
MCTS(SQL Server & BI)
http://bigdatatech.blogspot.com

Ramsakthi, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response