DATATable and INNERJOIN

P

Prasun

Hello:

Is it possible to create a datatable that is an Inner Join of two existing
datatables in a Dataset. If so, how do you do so?

Thank You
Prasun
 
W

W.G. Ryan eMVP

Probably the best way to do this is to fill the original datatable with the
results of a Join statement. The short answer, as far as doing this
directly w/ two data tables is No. you can specify a datarelation - but if
values aren't present in the parent table, then a constraint will be
violated. AFAIK, the only way to get there other than pulling the joined
data into the table from the server is looping through everything and
building it yourself.
 
P

Prasun

Hello:

I totally messed up when asking the question.... 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
 

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