TY for the response, In the recent code we are selecting data form temp table where DOC NOT IN (select DOC from table where code<> -1)
This is what the same we are trying to implement here. DOC will replace with all these 3 columns(emp1,emp2 and emp3)
That's why I tried to separate with comma and again select those columns in the query.
Structure should be same..
that's why I tried select * from Employee where (emp1,emp2,emp3) IN (select emp1,emp2,emp3 from employee)
In the where clause I can use the code which you provided to CAST in the select statement looks good to me.