By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,571 Members | 1,628 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,571 IT Pros & Developers. It's quick & easy.

DATATable and INNERJOIN

P: n/a
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

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Prasun" <pr******@csufresno.edu> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
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

Nov 21 '05 #2

P: n/a
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
"W.G. Ryan eMVP" <Wi*********@gmail.com> wrote in message
news:ev**************@TK2MSFTNGP10.phx.gbl...
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.

--
W.G. Ryan, MVP

www.tibasolutions.com | www.devbuzz.com | www.knowdotnet.com
"Prasun" <pr******@csufresno.edu> wrote in message
news:%2***************@tk2msftngp13.phx.gbl...
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


Nov 21 '05 #3

P: n/a
You might also want to check out this web-site that promises to provide a
..NET component to allow full SQL syntax queries against a DataSet.

http://queryadataset.com

Hope this helps
Ad.
"Prasun" wrote:
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

Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.