Question about datatables and sql

  • Thread starter Thread starter jm
  • Start date Start date
J

jm

I have three rows from a mysql database.

id, name, value

It prints three rows in my web form c#.

I want to know how to combine all the results in one row, filtered where needs be.

So, instead of;

1 johnny 5
2 bubba 6
3 jack 7

I want:
id name value
1 johnny, bubbba, jack 5,6,7

thank you for any help.
 
I have three rows from a mysql database.

id, name, value

It prints three rows in my web form c#.

I want to know how to combine all the results in one row, filtered where needs be.

So, instead of;

1 johnny 5
2 bubba 6
3 jack 7

I want:
id name value
1 johnny, bubbba, jack 5,6,7

thank you for any help.

First, I should have said they all had the same order id, not
different ones like above. But what I ended up doing was loading my
dataset from my database into another datatable (virtual in memory)
after the data was parsed. From there, I attached to a datagrid.
 
Back
Top