hi
In the below query the Name is in Table2 and Dept is in Table1, in such case how to alert the below query
in table1 Name = table2 empname
SELECT m1.Name,
( SELECT left(m2.Dept,1)+ '/'
FROMTable1 m2
WHERE m2.Name=
m1.Name
FOR XML PATH('') ) AS Dept_Group
FROMTable1
m1
GROUP BY m1.Name;