i have to compare two files.
file1 contains DT1 and it is smaller than the file2 that contains DT2
so for exp if DT1 contains only 4 rows i have to check if those 4 rows exist in the 4 first rows of DT2.
any ideas Please
First thing put a condition If DT1.rows.count = DT2.rows.count Then
Assign Activity to a DT3 = (From a In DT1.AsEnumerable() Join b In DT2.AsEnumerable() On a(“YourColumnName”).ToString() Equals b(“YourColumnName”).ToString() select a).CopyToDataTable
Thank you for your answer
in fact DT1 and DT2 can never have the same size
could you provide me with more détails please!
Size? you mean about count only right?
if DT1 contains 4 rows in column(“names”) i have to check if the first 4 rows in DT2 in column("message) has the same values as DT1 in column(“names”)
This DT1.rows.count and DT2.rows.count will give the output as total rows count only.
what i need is not to count the data rows but to compare the variables in both data tables
Yes, that is what I have given. You have mentioned a condition right in your very first statement if DT1 and DT2 count is equals to 4 then you need to match the value that’s why I have given that condition to count the row.
If the number of rows are equal between the two Datatables then I have asked you to put an assign activity for DT3 and given a query.
yes! thank you,
if i have to compare the first row in DT1 with the last row from DT2,
do you have any idea how to do that !
Looks like that’s a misunderstanding - that was not mentioned as a condition in @teyssir1 request.
@teyssir1 - What is your actual request? These are two different requests,
@sagacity - Good to know that you have a better understanding.