Ask Your Question
0

Delete with foreign key consrraints [closed]

asked 2017-09-14 21:11:38 +0100

Joe Castor gravatar image

My goal is to delete selected records (from MemberMaster) and have cascading deleting on associated tables containing a matching foreign key. I'm getting a " integrity constraint violation: foreign key no action; SYS_FK_10138 table: PhoneNumbers" error. I tried to use MATCH SIMPLE ON DELETE CASCADE with my basic statement `

` DELETE FROM "MemberMaster" WHERE "NotActive" = TRUE

with no success at all. I must really be misunderstanding the constraint definition concept. Been reading about it all day and understand less now then when I started. Any help is appreciated. Joe

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Joe Castor
close date 2017-09-15 00:36:07.232516

1 Answer

Sort by » oldest newest most voted
0

answered 2017-09-14 21:23:51 +0100

Ratslinger gravatar image

The problem is in your relations. From menu Tools->Relations. Right click line from 'Master' to 'PhoneNumbers' & select Edit. Then under Delete Options select Delete Cascade. Statement should work. You may want to check other relations for Add/Delete cascading effect.

edit flag offensive delete link more

Comments

Ah-Ha! That's where it was hiding. I must have missed that page. Thanks once more worker of miracles.

Joe Castor gravatar imageJoe Castor ( 2017-09-14 23:36:50 +0100 )edit

Unfortunately you probably didn't miss any page. It is in the 'Getting Started with Base` (getting started documents near top) guide and not in the Base section.

Ratslinger gravatar imageRatslinger ( 2017-09-14 23:51:22 +0100 )edit

Question Tools

1 follower

Stats

Asked: 2017-09-14 21:11:38 +0100

Seen: 152 times

Last updated: Sep 14 '17