Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net Join two data tables

Is it possible to join two data tables?
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

please clarify if you want to "append" the 2 data tables or if you want to do indeed a "SQL Join" ...

anyhow, first one is to be found easily by checking the Merge method of the datatable.
second one is "easily" with Linq statements, though other methods exists.
of course, if the underlying data is coming from the same database, you could indeed think about doing the "join" in sql directly...
Avatar of Murray Brown

ASKER

Hi
I want to do a SQL join.
Thanks
you use a dataview and datarelation object to do so, see here for the starting syntax:
http://msdn.microsoft.com/en-us/library/fa04ha86%28v=vs.110%29.aspx
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks very much. I am going to be doing this with a variety of tables