× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Any attempt to delete a row from a parent table that has a referential
constraint with a child file will result in SQL7008-3 if these files are
not journalled to the same journal.

CRTLIB MKIRK
STRSQL
CREATE TABLE MKIRK/PARENT
(PARENTNO INT AS IDENTITY, DUH CHAR ( 1) NOT NULL
WITH DEFAULT, CONSTRAINT PARENT_PRIKEY PRIMARY KEY (PARENTNO))
INSERT INTO MKIRK/PARENT (DUH) VALUES('A')
CREATE TABLE MKIRK/CHILD (PARENTNO INT , CHILDNO INT , DUH CHAR (
1) NOT NULL WITH DEFAULT, CONSTRAINT CHILD_PRIKEY PRIMARY KEY
(PARENTNO, CHILDNO), CONSTRAINT PARENT_CHILD FOREIGN KEY (PARENTNO)
REFERENCES MKIRK/PARENT (PARENTNO) ON DELETE NO ACTION ON UPDATE NO
ACTION)
Table CHILD in MKIRK created but was not journaled.
iNSERT INTO MKIRK/CHILD VALUES(1, 1, 'Y')
1 rows inserted in CHILD in MKIRK.
iNSERT INTO MKIRK/CHILD VALUES(2, 1, 'Y')
Operation not allowed by referential constraint PARENT_CHILD in MKIR
INSERT INTO MKIRK/PARENT (DUH) VALUES('u')
1 rows inserted in PARENT in MKIRK.
delete from mkirk/parent where duh='u'
PARENT in MKIRK not valid for operation. (SQL7008-3)

DSPMSGD SQL7008 MSGF(QSQLMSG)

Rob Berendt

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.