Tuesday, February 23, 2016

select
   distinct
    stuff((
        select ',' + u.EmailID
        from tbl_registration u
        where u.Rid = Rid
        AND Interviewed=0
        order by u.Rid
        for xml path('')
    ),1,1,'') as userlist
from tbl_registration

group by EmailID

No comments:

Post a Comment