Subject RE: [firebird-support] Problem when creating FK
Author Svein Erling Tysvær
Does this statement return any rows?

SELECT EV.POSICAO_ID_FINAL
FROM EXCESSOS_VELOCIDADE EV
WHERE NOT EXISTS(SELECT * FROM POSICOES P WHERE P.COMUNICACAO_ID = EV.POSICAO_ID_FINAL)

If so, that value must be added to POSICOES before you can create your foreign key.

HTH,
Set