|
-
May 7th, 2012, 04:16 PM
#7
Thread Starter
Member
Re: How to break down a DataTable into groups of rows(ones with same traits under Col
Sorry about the confusion. Below are some samples from my table to illustrate what i want to do
PartName|Reference Designator| PartNum | Manufacturer (and few other information..)
x|C201 |02300877 |Samsung |….
x|C201 |02300877 |Toshiba |….
x|C207 |02301165 |....
x|C209 |02301165 |….
x|C213 |02300877 |Samsung
x|C213 |02300877 |Toshiba
x| C303 |02301163
x| C305 |02301163
x|C606 |02300877 |Samsung
x|C606 |02300877 |Toshiba
x|C708 |02301165
x|C712 |02301163
Primarily I'm trying to group entries with same PartNum together. This part can be done, as jmcilhinney suggested, by using DataView(DefaultView) to seperate the table into many(3,for the above sample's case)sub-tables. After I got the sub-tables, I want to go into each subtable and combine similar entries, as they only differ by Reference Designator now(I'll worry about difference in Manufacturer info later). Finally I would join everything back to one big DataTable now that they are properly sorted, grouped and combined. So part of the final Table would look like
x| C201,C213,C606,C619 |02300877
x| C303, C305,C712 |02301163
x| C207, C209, C708 |02301165
I think the confusion about whether I want to partition or aggregate arose as i only mentioned half of what I'm trying to do. Suggestions on the first half to partition or the second part to combine similar entries are all appreciated. Thanks guys.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|