I've 2 excel sheets. One has the asset mapping (assets tagged to each employee) & the other has the organization head count (employee ID & the Name of all the valid employees). Now I want to check whether all the assets are tagged to a proper associate (i.e., employees tagged to a asset should be currently working in the organization), if not, I need to get the details of assets that are tagged to invalid users. For this I need to have a join condition from the 2 excel sheets & should load the result to a datatable (which I can latter show in a datagrid view or use to compose a mail to senior leadership).
So, I want to load the datatable from these 2 excel sources, with below similar query,
select a.[Asset ID], a.[EmpNo] from [AssetMapping$] as a
Where a.[EmpNo] Not IN (select b.[EmpID] from [EmployeeDetails$] as b)
However I am not able to refer two excel sheets while loading data to a datatable (but I can do so if the data are present in two different sheets within same excel, which is not I am looking for).
Kindly help me in getting the required data from 2 different excel sheets to a single datatable.
Thanks in advance.