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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Self join

Author  Topic 

avijit_mca
Posting Yak Master

109 Posts

Posted - 2010-11-12 : 05:58:41
Tab1:

col1 col2 col2
a 1 2009-03-31 01:18:35.0
a 2 2009-03-31 01:19:35.0
a 3 2009-04-31 02:18:35.0
b 1 2009-03-31 01:18:35.0
b 2 2009-04-31 01:20:35.0
c 1 2010-02-12 04:18:35.0
c 2 2010-03-12 01:18:35.0
c 3 2010-03-12 01:19:35.0

How i will find out colum :
Search condition : which row repeated with in 2 min with in same col1.
col1 col2 col2
a 1 2009-03-31 01:18:35.0
a 2 2009-03-31 01:19:35.0

b 1 2009-03-31 01:18:35.0
b 2 2009-04-31 01:20:35.0

c 2 2010-03-12 01:18:35.0
c 3 2010-03-12 01:19:35.0

Please provide me the SQl Coding .if possible in SYbase.

Regards,
avijit
   

- Advertisement -