0

I have few tables

EMP

EmpCode, EmpName, Age

Attendance

AtCode, EmpCode, Sample1, Sample2

AnotherTable

id, EmpCode, Sample4, Sample5

Now my query is

SELECT distinct b.Sample4, e.EmpName, A.Sample1, A.Sample2 FROM  Attendance  A inner join
EMP e on a.EmpCode=e.EmpCode
left join AnotherTable b on A.EmpCode=b.EmpCode

This query results in following records

Sample4      EmpName    Sample1  Sample2
MG           Joy         01      11104
ST           Joy         01      11104  

I need the result as

Sample4      EmpName    Sample1  Sample2
MG,ST            Joy         01      11104

How can we achieve this.

Surensiveaya
  • 297
  • 1
  • 12

0 Answers0