Remove conditional rows

Hello everyone, I need help with the following, having two datatables I need that, from the dt2 table only if the content of the Pedido column starts in 45d, the Factura column is compared with the column of the same name of the dt1, if the number It is found in the dt2, it remains, but if it is not found, it must be removed from this file but saved in a new one.

I hope I have made myself understand

DT1

DT2

What you want to do is JOIN of DT1 and DT2.
Specificaly
1/ INNER JOIN to get DT2 records with matching “Factura” in DT1
2/ LEFT OTER JOIN to get DT2 records not matching “Factura” in DT1

You could try searching these terms in this forum for more info.

You could achieve this by using “Join Data Tables” activity.

Alternatively you could use LINQ expression - more advance.

Cheers

Please also check out this:

Blockquote JoinType - The type of Join operation you want to use. The following options are available:
Inner - Keep all rows from DataTable1 and DataTable2 which meet the Join rule. Any rows that do not meet the rule are removed from the resulting table.
Left - Keep all rows from DataTable1 and only the values from DataTable2 which meet the Join rule. Null values are inserted into the column for the rows from DataTable1 that don’t have a match in the DataTable2 rows.
Full - Keep all rows from DataTable1 and DataTable2, regardless of whether the join condition is met. Null values are added into the rows from both tables that don’t have a match.