Left Join Datatable with lenght

Hi everyone,

My query is
i need to do left join of two datatable

datatable1 datatable2
500.000 1680000.00
100.000 100.000

First we need to loop and replace “.” with “” and then do left join and again left join with len(data) - 3 (remove trailing zeros)

thanks in advance


Hi @kavya.s16 ,

Could you maybe provide the Expected Output for the above provided Input data as well. So that we could be sure as to the logic that we would be applying.

DT2 should present in DT1

output would be 100

we do have some doubts on the requirement description and the mentioned output.

When the output is only 100 then it is more a hint to match / inner join case

dtOuput = dt1.Clone

dtOutput =

(From d1 in dt1.AsEnumerable
Join d2 in dt2.AsEnumerable
On CDbl(d1(0).toString) Equals CDbl(d2(0).toString
Let ra = new Object() {CDbl(d1(0).toString)}
Select r = dtOutput.Rows.Add(ra)).CopyToDataTable

Handling empty resultrs as described here:
:ambulance: :sos: [FirstAid] Handling of The source contains no DataRows exception - News / Tutorials - UiPath Community Forum

@ppr thanks for the replay

Okay !! let me elaborate
As mentioned above those are the two datatables!!
For datatable1 apply replace comma with “”
I need to loop through Datatable2
then apply => left(1680000.00,6) (6, bcoz len -3 so 9 minus 3 =6) output = 168000

then will have to check whether this is there in datatable1