Posted by: raajkm July 8, 2019
Please help on Sql query
Login in to Rate this Post:     0       ?        
WELL i do not use sql server 2012 but you might use the query as;

select to_date((to_char(S1.dateOfBirth, 'YYYY-MM-DD')),'YYYY-MM-DD') date_of_Birth,
stuff ((select distinct ','+ Name from student s2 where FOR XML PATH(' ')),1,1,' ') as name_of_students

from student s1 group by to_date((to_char(S1.dateOfBirth, 'YYYY-MM-DD')),'YYYY-MM-DD')
Last edited: 08-Jul-19 12:16 PM
Last edited: 08-Jul-19 12:17 PM
Read Full Discussion Thread for this article