Datatables and Outer Join

P

Prasun

Hello:

Here is my problem statement/ background

Background: My program reads an excel file and populates three datatables
depending on the value in one of the columns. Now when i create a
datarelation and try to combine the tables, I loose values that are unique
in the child tables. I want to make sure that even those values will get
transfered. Is there a way to go about this? That is why i was wondering if
there is a way i could program an OuterJoin, leftjoin or so. I could make
the two datatables, fill up excel sheets with that info and then start using
those table to make the outer join but wanted to make sure if there was an
easier way

All help would be appreciated,

Thank You
Prasun
 
W

WJ

1. You can use "=" (exact match) to get both tables values
2. You can use "*=" (left) to include anythings that are not on the right
3. You can use "=* (right) to include anythings that are not on the left

PS: The above syntax apply to MS/SQL RDBMS

John
 
W

W.G. Ryan eMVP

If you have 3 separate datasets, you can use DataSet.Merge to get all of the
values from two tables into one table. Where tehy are the same, they'll be
combined, where they aren't, they'll be added. THen merge teh third dataset
with the results of the merge of the 1st two datasets.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top