× 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.



I would think a simple foreign key would be simple. Its not apparently.

tl;dr: If I add a foriegn key to a child table, I can insert into the
parent table, but not update it (I'm not updating the foreign key column)

The long version

I have two tables ABBAPF and ABBACPF. They don't have journals created
according to the output of the create table statement. In the later I have
a foreign key setup like this:

AD_ID FOR COLUMN ABADROWID BIGINT NOT NULL
CONSTRAINT WEBLIB.FK_ABBACPF_ABBAPF REFERENCES WEBLIB.ABBAPF(ROWID),

I can insert into the parent table with no problem. However, this update
fails


UPDATE WEBLIB.ABBAPF SET XML_COL = XMLPARSE(DOCUMENT '<xmlRoot/>'),
ABMSGSTAMP = CURRENT TIMESTAMP, STATUS = 0, MESSAGE = 'Success' WHERE ROWID
= 1 WITH NC

[SQL7008] ABBAPF in WEBLIB not valid for operation. [SQL State=55019, DB
Errorcode=-7008]

Note I tried adding the WITH NC after the fact. removing it doesn't help.

Dropping the child table makes the update work. therefore I'm pretty sure
its not journaling like this article says

http://www-01.ibm.com/support/docview.wss?uid=swg21380662

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.