Integrity constraint violated



Hi,
I have a database on Oracle 9.2. in schema TEST there're tables:
zamowienia_pozycje and stawki_vat.
While executing insert command::

INSERT INTO ZAMOWIENIA_POZYCJE
(ZAMOWIENIE_ID,OPERATOR_ID,POZYCJA_ASORTYMENTOWA_ID,POZYCJA_CENNIKA_ID,CENA,WARTOSC_WSPOLCZYNNIKOW,STAWKA_VAT_ID,
STATUS_POZYCJI_ZAMOWIENIA_ID,LICZBA_SZTUK,ZLOZONA_NAZWA_POZYCJI)
VALUES (4,1,6,1,2,1,1,1,1,'test')

Oracle throws an exception:
"ORA-02291: Integrity constraint violated (TEST.ZAM_POZ_STAWKA_VAT_FK)
- parent key not found\n"

There's a ZAM_POZ_STAWKA_VAT_FK constraint script:

--ZAM_POZ_STAWKA_VAT_FK
--
ALTER TABLE ZAMOWIENIA_POZYCJE ADD (
CONSTRAINT ZAM_POZ_STAWKA_VAT_FK FOREIGN KEY (STAWKA_VAT_ID)
REFERENCES FAKTURY_VAT (ID));


Anybody knows, why this constrain is blocking my insert command?

.



Relevant Pages

  • SUMMARY: sudo version 1.6.7p5 : using -H -u options on Solaris 8
    ... Many thanks to those that responded, as expected all responses were helpful. ... This will allow you to do the thing that the user oracle requires while also ... designated in the sudoers file who requires to use the command, ... there is a CLASSPATH variable set which, as the oracle user I can see by ...
    (SunManagers)
  • Re: Basic question | run multiple queries without reconnecting
    ... :>From an oracle client like oracle sqldeveloper, I can run the DCL - ... : system as role: sysdba - but then I cant even connect to the db.. ... as default - I get the same error when I run this command: ...
    (comp.databases.oracle.server)
  • Re: How many names and addresses can you have for ID card
    ... Think command line only (except when you're installing, ... which is unsettling to we Linux users. ... This is NOTHING to do with Oracle though. ...
    (uk.legal)
  • Re: ODBCCommandBuilder produces different UpdateCommand with Oracle using field name aliases
    ... Hitchhiker's Guide to Visual Studio and SQL Server ... generates an exception: ... In Oracle, the field name alias "PG" is used. ... Is there a way to force the command builder to create an update ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: AIX Performance issue
    ... however approx 30 users normally access AIX server ... > through oracle application, every thing was running fine during last 3 ... > sar and lpstat command and their output was as given below. ... > Mostly when error occurred our database daily backup was in process ...
    (comp.unix.aix)