First, you need to create a temporary table joining the tables A and B to get the fields DTIN and DTCK on the same table.
Then, you can create an other table to filter the values using the where clause DTIN > DTCK.
The code would be similar the following code:
Select * From A;
Select * From B;
Where DTIN > DTCK;
drop table tmp;
Hope it helps you