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 |
|
FightingTiger
Starting Member
23 Posts |
Posted - 2012-08-01 : 14:23:26
|
| I have a an acctnumber that was assigned two different acctIDs is there a way to set up a case statement or a where clause that would allow me to pull back any acctnumber that has more than 1 AcctNumber? |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2012-08-01 : 14:25:50
|
| SELECT AcctNumberFROM myTableGROUP BY AcctNumberHAVING COUNT(DISTINCT AcctID)>1 |
 |
|
|
FightingTiger
Starting Member
23 Posts |
Posted - 2012-08-01 : 14:30:37
|
| Thank you very much. |
 |
|
|
|
|
|