The DataSet class doesn't have a Select method to allow you to do this easily. If your DataSet, which is a collection of DataTable and DataRelation objects, has those relationship objects in it, you can build your own table by enumerating the Name records in the "Table1" table, and lookup up the keys in the "Table2" table. You'd be able to interate over those records to build the Sum you want, then just add the Name and Sum to the DataTable you're building. Or, you can simplify this greatly by having the database do it and just hand to you table, just like the SELECT commands you executed to get these tables in the first place.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007