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
 General SQL Server Forums
 New to SQL Server Programming
 query help

Author  Topic 

pnpsql
Posting Yak Master

246 Posts

Posted - 2012-03-03 : 10:07:38
hi team , i have a following tables with 4 cols

id vid cid nid
1000001 1000002 1000001 1000001
1000002 1000002 1000001 1000001
1000003 1000001 1000001 1000001
1000007 1000004 1000001 1000001



i need to get duplicates rows and i want that the check on id col
that if there is diffrence of +1 or -1 it is consider as no diffrence get in duplicate list

please help





challenge everything

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2012-03-03 : 10:49:53
Not sure I follow. If that's a set of sample data, what do you want back from the query for that set of data?

--
Gail Shaw
SQL Server MVP
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-04 : 10:25:39
if there is diffrence of +1 or -1 it is consider as no diffrence get in duplicate list
which all columns you need to consider for this?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

pnpsql
Posting Yak Master

246 Posts

Posted - 2012-03-04 : 23:18:33
i need the same on id column



challenge everything
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2012-03-05 : 05:23:27
Please post the expected output from that sample data.

--
Gail Shaw
SQL Server MVP
Go to Top of Page
   

- Advertisement -