That is the problem of your where condition. Are the two tables related through the fields you wrote, and the condition is wrong, there must be no data ...
WHERE ("contract". "Gsxm" = "project". "Xmbm")
Having a primary foreign key and whether to set the relationship are two different things, see if the xmbm and gsxm data in the two tables are the same