Select from 2 tables in a DataSet

DaveRX9999

New member
Joined
Mar 9, 2005
Messages
1
Programming Experience
10+
If I have a DataSet with two DataTables, can I do something like this?

Select Table1.Column3 as YesterdaysVolume, Table2.Column3 as TodaysVolume
From Table1, Table2
Where Table1.Column1 = Table2.Column1
And Table1.Column2 = Table2.Column2
Order By Table1.Column1, Table1.Column2


What I want to end up with is a DataTable containing the results, exactly as if I had performed the query against 2 tables in a database.

I know that I can setup some DataRelations, but I don't really want to have to loop through Table1 and do a GetChildRows since this isn't a parent/child situation.
 
Hi,
I think you could solve this in your sql-query instead. Post your t-sql statments here, and we´ll see.

/Pelle
 
Back
Top