If your SP's output is result set, you need to save it to temporary table like this:Create Table #temp( col1 ... col2 ...)Insert #tempExec [CRMBackOffice].[dbo].[csp_GetCRMIIICustomerList]
Then you can refer to the temp table in your query:SELECT BRN_CustCode, BRN_Name1, BRN_Name2, BRN_StatusFROM [VENUS_II].[dbo].[Branches]WHERE BRN_CustCode NOT IN (Select BRN_CustCode from #temp)
Remember, your table structure should exactly match the result set in terms of data type and size. Also, I am suggesting this assuming csp_GetCRMIIICustomerList is an SQL Server SP and resides on the same server.Harsh AthalyeIndia."The IMPOSSIBLE is often UNTRIED"