Jagan Mohan

Jagan Mohan

  • NA
  • 19
  • 57.1k

How to get Comma Delimited Values in SQL Server by Grouping?

Apr 1 2013 5:40 AM

Hi to all.In my database i've three tables Empl,Items,Orders as follows 

                               

EmpId

EmpName

1

Ravi

2

Kumar

3

Sam

4

Telpo

               

Itemid

ItemDesc

1

keyBoard

2

Mouse

3

Harddrive

4

CableBus

 

OrderId

EmpId

Itemid

1

1

2

2

1

4

3

2

1

4

2

3

 

Now i need to display the last table in a report as follows

Empname

ItemDesc

Kumar

CableBus, Harddrive 

Ravi

keyboard, Mouse

 Can anyone please helpme out for this scenario.

                                                                  Thanks in Advance.


Answers (1)