开发者

merging two data tables in a third table in c#

开发者 https://www.devze.com 2023-02-20 16:37 出处:网络
I have two data tables containing one c开发者_如何学编程ommon column.I want to create a join between the two tables and get the data in a third table.

I have two data tables containing one c开发者_如何学编程ommon column.I want to create a join between the two tables and get the data in a third table.

eg data table 1: column employeeid,name,number

data table 2: column employeeid

i want to remove all the employee id's that are in the second table from the first table and display the rest of the values.

Can someone please help me with this.

Thanks


The CreateJoinTable method in this article provided one solution to your question: http://support.microsoft.com/kb/326080/en-us

Also, dataTable.Merge() is an option to look at.

Last, I suspect you will get a wealth of information from StackOverflow if you haven't already posted this question there as well.

My apologies if your question was not targed at C# as the answer will depend on the target platform you are querying ... SQL Server, MySQL, C# code, etc.

Have a great day.

0

精彩评论

暂无评论...
验证码 换一张
取 消