Brad Clements wrote :
>I'm trying to execute this sql statement:
>update specialist set specialistid = 'dfois' where specialistid = 'debbie'
>but I get an error:
>> Integrity constraint violation;350 POS(1) Referential integrity
>violated:SPECIALISTMANAGERLINK_SPE
>This doesn't make sense.. I thought that updates would cascade.
>When I converted my db from Interbase, I had to drop "on update cascade", I thought
>that was assumed, but in the following case it fails.
>Note that "debbie" appears only in one row, only on the specialistid column in the
>following table. Any ideas why this doesn't work?
>Thanks
>CREATE TABLE "DBA"."SPECIALISTMANAGERLINK"
>(
> "SPECIALISTID" Varchar (6) ASCII,
> "MANAGERID" Varchar (6) ASCII,
> PRIMARY KEY ("SPECIALISTID", "MANAGERID"),
> FOREIGN KEY "SPECIALISTMANAGERLINK_SPECIALI" ("SPECIALISTID") REFERENCES
>"DBA"."SPECIALIST" ("SPECIALISTID") ON DELETE CASCADE,
> FOREIGN KEY "SPECIALISTMANAGERLINK_MANAGERI" ("MANAGERID") REFERENCES
>"DBA"."SPECIALIST" ("SPECIALISTID") ON DELETE RESTRICT
)
The update rule of SAPDB implicitly is 'ON UPDATE RESTRICT', i.e. the update of a
master row fails
if any child rows exists.
'ON UPDATE CASCADE' is not implemented.
You can simulate the key update if you delete the row and insert it again with the new
key.
Thomas
--
Thomas Anhaus
SAP DB, SAP Labs Berlin
[EMAIL PROTECTED]
http://www.sapdb.org/
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general