1

I have a dataset which have four datatables.

  • Table[0] contains columns such as: storedProcedure,DLLMethod,BLLMethod
  • Table[1] contains columns such as: DLLMethod,BLLMethod
  • Table[2] contains columns such as: UCName,BLLMethod
  • Table[3] contains columns such as: UCName,Function,Module
  • Table[4] contains columns such as: StoredProcedure,Function,Module

I want to join first four tables such that final table must contain StoredProcedure,Function and Module.Can anyone Please help me with C# coding?

H H
  • 263,252
  • 30
  • 330
  • 514
Prem
  • 5,685
  • 15
  • 52
  • 95
  • @Prem You have asked many questions. If you feel you have been given useful and correct answers for any of these questions then you should mark those answers as accepted. – Tim Lloyd Nov 30 '10 at 14:03
  • @Prem Also if you accept an answer and you think it is a good answer, up-vote it as well. You have lots of accepted answers with zero votes. – Tim Lloyd Nov 30 '10 at 14:05
  • And inform us how those tables are related. On first view, table[1] is not necessary at all. – H H Nov 30 '10 at 14:22
  • possible duplicate of [Inner join of DataTables in C#](http://stackoverflow.com/questions/665754/inner-join-of-datatables-in-c-sharp) – Matthew Lock May 21 '15 at 07:38

1 Answers1

2

LINQ to DataSet

dim query = from a in table1 join b in table2 on a.table2ID = b.ID select a,b

this can grow on many more tables by adding more joins

var query = from a in table1 join b in table2 on a.table2ID = b.ID select a,b;
Ali Tarhini
  • 5,278
  • 6
  • 41
  • 66
  • Thank You very much... Would you please Provide me a more clear c# coding as Im a beginner. – Prem Dec 01 '10 at 04:09