1

When i run the query:

select * from table where UserID='21';

My sql result shows as below:

UserID FName  LName  StatusID  Company   Notes 
21     Sam    Jones  21        AT&T      Applied
21     Sam    Jones  32        Verizon   In Process
21     Sam    Jones  36        T-Mobile  Applied

Is there a way for me to get the result in the following manner ?

UserID FName  LName  StatusID   Company                 Notes
21     Sam    Jones  [21,32,36] [AT&T,Verizon,T-mobile] [Applied,In Process,Applied]

Any tips in the right direction would be of great help too. Thanks.

Harsha Jasti
  • 1,114
  • 1
  • 9
  • 25

1 Answers1

0

I did it with a data table I have try this for your's

enter image description here

enter image description here

Nisal Edu
  • 7,237
  • 4
  • 28
  • 34