(SELECT DISTINCT CDCUSTN FROM CARDS.DBO.TOTAL_CDBS11801 WHERE PRCARDN IN
(SELECT PRCARDN FROM CARDS.DBO.TOTAL_CDBS11801 WHERE CARDNO IN (SELECT * FROM #T)
) AND CRDIND ='P') = (IT.IPKIPN)
What you actually have here is A = B, where A (the select clause) has multiple values... You can not do = (equal) with more than one values in either side...