I need to select only the first row from a query that joins tables A and B. On table B exist multiple records with same name. There are not identifiers in any of the two tab
Not sure if this will solve your problem or not, but you could try using the GROUP BY clause and group by one of the name columns.
DB2 Group by tutorial