> Let's create two unites from one lot:
> 
> INSERT INTO UNITES (CODE, LOT, SITE, DESCRIPTION) VALUES ('A1', 'L1', 'S1',
> 'abc'); INSERT INTO UNITES (CODE, LOT, SITE, DESCRIPTION) VALUES ('A2',
> 'L1', 'S1', 'bcd');
> 
> I expected that the following instruction will not be exectued:
> INSERT INTO LOCATION (ID, UCODE, ULOT, USITE, ZONE, WAREHOUSE)
> VALUES (1, 'A3', NULL, NULL, NULL, NULL); because there is no A3 entry in
> unites table, but it IS! Firebird allows to add record with value which 
> doesn't
> exist in master table.

I believe that your schema for the LOCATION table is incorrect.  

UCODE, ULOT and USITE should be described as NOT NULL, since a Location must 
relate to a UNITES (which has CODE, LOT and SITE described as NOT NULL), no?


Sean

  • [firebird-su... Paweł Świerzko p_swier...@poczta.onet.pl [firebird-support]
    • Re: [fi... 'livius' liviusliv...@poczta.onet.pl [firebird-support]
    • RE: [fi... 'Leyne, Sean' s...@broadviewsoftware.com [firebird-support]
      • Re:... Helen Borrie hele...@iinet.net.au [firebird-support]
    • Re: Re:... Paweł Świerzko p_swier...@poczta.onet.pl [firebird-support]

Reply via email to