Create table #temp (name varchar(10) , email varchar(5000))
Insert into #temp values ('sam', 'sam@email.com,pam@email.com,kam@email.com')
Select * from #temp
Create table #temp2(id int, email2 varchar(5000))
Insert into #temp2 values (1, 'sam@email.com')
select * from #temp2
But when I try to select from below query then its not working.
Select * from #temp2 Where email2 in (Select email from #temp)
I want to pass email in the below format then it will work. 'sam@email.com','pam@email.com','kam@email.com' IS there any easier way to achieve this?