Subject | RE: [firebird-support] Problem when creating FK |
---|---|
Author | Svein Erling Tysvær |
Post date | 2012-01-26T14:26:12Z |
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
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