I need to implement the following query in SQL Server:

select *
from table1
WHERE  (CM_PLAN_ID,Individual_ID)
IN
(
 Select CM_PLAN_ID, Individual_ID
 From CRM_VCM_CURRENT_LEAD_STATUS
 Where Lead_Key = :_Lead_Key
)

But the WHERE..IN clause allows only 1 column. How can I compare 2 or more columns with another inner SELECT?

13 Answers
13

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *