Hello all,
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
Thanks,
AK
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!
thanks
Size? you mean about count only right?
Regards,
AK
yes,
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.
Regards,
AK
yes,
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.
Thanks,
AK
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 !
Thanks,