将不同数据源的数据集合并到一个DataSet中 [英] Merging dataset of Diffferent Datasources into one DataSet
问题描述
我有一个存储过程,为某些员工提取了100多个工资记录。我有一个外部Excel工作表,其中包含这些员工的出勤记录..
这两个数据来源有employee_id作为公共字段
现在我需要的是当我导入Attendance excel表时它应该合并由Stored Procedures数据提取的数据并且应该形成一个最终的数据集,我想把这些新形成的数据集的记录放到其他新表中。
请帮帮我,我怎样才能完成同样的工作。
I have got a Stored procedure that fetches me 100 plus or so salary records for certain employees..and I have an external excel sheet that has attendance records of those employees..
Both these data sources have employee_id as common field
Now what I need is when I import the Attendance excel sheet it should merge the data being fetched by the Stored Procedures data and should form one final data set and I want those records of these newly formed data set into some other new table .
Please help me out , how can I accomplish the same.
推荐答案
我在MSDN上发现了这个(现在已经过时了)
实现数据集连接助手类 [ ^ ]
替代使用Linq是在这里讨论 [ ^ ]
或者你可以将电子表格加载到SQL 从Excel将数据导入SQL [ ^ ]和通过存储过程进行加入
对不起,由于您没有提及语言,版本等,我无法提供更多具体细节。
I found this (rather out-dated now) on MSDN
Implement a Dataset Join Helper Class[^]
Alternative using Linq is discussed here[^]
Alternatively you could load the spreadsheet into SQL Importing Data to SQL from Excel[^] and do the join via the Stored Procedure
Sorry I can't give much specific detail as you haven't mentioned language, versions etc.
>
这篇关于将不同数据源的数据集合并到一个DataSet中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!