Home All Groups Group Topic Archive Search About

Can I join Datatables inside dataset to become a new datatable?

Author
21 Jul 2006 6:01 AM
hangdee
I have 2 datatables (get from database) inside a dataset.
How can I create another datatable which is a result of
Select tb1.xxx, tb2.yyy from table1 as tb1 left join table2 as tb2 on tb1.id
= tb2.t1id

Is there any sample code for it?

Author
21 Jul 2006 6:08 AM
Cor Ligthert [MVP]
Hangdee,

There will be Linq, as long as that not exist you have to do it with looping
by instance using this.

http://www.vb-tips.com/dbpages.aspx?ID=5fd5a8cf-54dc-4946-a193-8a9529b2b38b

I hope this helps,

Cor

Show quoteHide quote
"hangdee" <hang***@discussions.microsoft.com> schreef in bericht
news:D5DFF234-273C-4A1F-9F5B-7D56FDB9980B@microsoft.com...
>I have 2 datatables (get from database) inside a dataset.
> How can I create another datatable which is a result of
> Select tb1.xxx, tb2.yyy from table1 as tb1 left join table2 as tb2 on
> tb1.id
> = tb2.t1id
>
> Is there any sample code for it?
>