I have a table [TRANS] that has the following fields: ID, REQ_ID_TRANS, REQ_ID, CREATE_DATE, and a few other fields.
I need to be able to retrieve all the records (with all its fields) that have duplicate values in REQ_ID_TRANS, REQ_ID.
I can easily find the duplicate records by using a SELECT of those two fields and using GROUP BY & HAVING COUNT(*) > 1.
That's not the question.
My question is: Without using a cursor, a temp table, or a nested SELECT, how can I integrate this GROUP BY into a SELECT that will display all the fields from all those duplicate records?
Essentially, I will display all the fields of all the records that have REQ_ID_TRANS, REQ_ID duplicated.
Thanks.