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 |
|
uplate
Starting Member
10 Posts |
Posted - 2004-11-01 : 01:06:33
|
| Hello all! Thanks in advance for your help.I hope someone can offer some help. I am a very NEWBIE.I have a table with 2 fields. Field 1 called t1, Field 2 called t2table look like this:FIELDS t1 T2DATA : 1 TEST1 1 TTTT1 2 OK 3 OK 4 hhh 4 uuu I NEED TO PULL OUT THE DATA WHEN field T1 IS DUPLICATED BUT field T2 IS DIFFERENT?SO OUPUT looks like1-- TEST1 1-- TTTT1 4-- hhh4-- uuuI hope there is an easy sql statement to handle this.ANY HELP WOULD BE GREAT!THANKSUPLATE |
|
|
B0g
Starting Member
19 Posts |
Posted - 2004-11-01 : 02:46:39
|
| SELECT * FROM Table WHERE t1 IN (SELECT t1 FROM Table GROUP BY t1 HAVING COUNT(t1) > 1 ) |
 |
|
|
|
|
|