Need Linq for below logic compare output data table row to multiple row

Hi Team,

I have LINQ to solve below process,

I have 7 CSV file from client need and 1 separate csv file in that seprate CSV file we can get “ID” data and put in out put excel.

Now output excel we have data “ID” now we need to start process,

Need to search all 7 CSV file and fetch the data in to output.

Like all 7 csv file we can convert as database after that from out put file we get “ID” data and search in database 1 and fetch some coulmn data and save it in output like wise we need to get the data for remaing database row by row.

PFA below,


here i use 5 dt but in real case we have 7 dt

how can i fetch coulmn based on if id is matched in that dt?

“ID” is name which not constant in all the database it have different name also.

Simply the thing is need to compare ID and get coulmn details if found in that database.

Dt1,2,3,4,… have more coulmn but i need specific coulmn data only.

Thanks,
Vicky

The shown expected output let us not derive all rules. E.g 100 is in it but not 190 and more.

However there are a few options on how we can achieve it

For all: harmonize the Join ColumnNames (ID, id_num)

  • chained full joins (Join DataTable Activity) and postprocessing the join result

OR

  • merge All Tables within a consoldiated DataTable
  • Group by on ID and postprocessing the the group members

We assume that hybride (LINQ, NON-LINQ) combined approaches will serve more traceable as a Black-Box LINQ statement

The thing is we get ID and search in dt1 if “ID” is matched means i need to get particular data from that dt1…

then need to search in dt with same “ID” and it is matched means i need to extract details like wise i need to do…

For that i need LINQ

first clear all requirement rules
then decided on the solution approach

as mentioned:

100 not matching in all tables
777 only in dt5
900 only in dt5
987 only in dt5 (sames as 900, but not in the expected output listed)

we cannot derive clear and consistent rules from the output and given input. Therefore:
Respecify the requirements and set up clear definitions

Ok here i try to clear explain.
now ID is primary one.

i take “ID” from out put and search the “ID” in dt1

if “ID” is matched means need to take “Name” from dt1
suppose id is not matched meas leave it blank.

If “Id” is matched dt2 need to take “Gender” column data.
no means leave it blank

If “id” is matched in dt3 need to get “Status” column if no means leave it blak like wise we need to check all 7 dt.

If id is matched i need to extract particular coulmn from database.

Hope you understand.

Thanks,
Vicky