0

Select * from PBM.T_CHARGES where TIER <> 'T1' and STAT NOT IN (3,4,5)

I want to list only where the RX number is repeated in the table.

  • possible duplicate of [Finding duplicate values in a SQL table](http://stackoverflow.com/questions/2594829/finding-duplicate-values-in-a-sql-table) – Vulcronos Aug 12 '14 at 19:35

1 Answers1

2

Use a GROUP BY with the HAVING

Select RX from PBM.T_CHARGES where TIER <> 'T1' and STAT NOT IN (3,4,5)
GROUP BY RX
HAVING COUNT(*) > 1
T McKeown
  • 12,971
  • 1
  • 25
  • 32