SELECT CLIENT_ID,ADR_SEQ_NBR FROM PSTPROD.CLT_ADR_RELATION
WHERE ADR_TYP_CD = 'HHA'
AND CIAR_EXP_DT = '9999-12-31'
GROUP BY CLIENT_ID,ADR_SEQ_NBR
HAVING COUNT(*) > 1
ORDER BY CLIENT_ID,ADR_SEQ_NBR
This fetches the rows if CIAR_EXP_DT = '9999-12-31' , and Adr_seq_nbr of either 0 or 1 etc .. and have duplicate rows for the same client id..but i need to fetch the duplicate rows even if the adr seq nbr is a combo of 0,1,2 etc.. As of nw it fetches only if adr_seq_nbr is either 0 or 1 or 2 ..
Can anyone suggest the modifications to above query to match my requirement?
Thanks
Uday