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