On Tue, 27 Apr 2004, Glenn MacGregor wrote: > Now I need to change the parentname field (in the case of vimid = 2) > from [EMAIL PROTECTED] to test and keep the vimname field as is. When I do > this the constraint no longer works (which makes perfect sense). > > 1 | [EMAIL PROTECTED] | cell | f | [EMAIL PROTECTED] | cell | test.xml | > 192.168.0.23 | | 1 | t | group1 > > 2 | [EMAIL PROTECTED] | cell | f | [EMAIL PROTECTED] | cell | test_if.xml | > 192.168.0.23 | test | 2 | t | group1 > > delete row 1 and row 2 stays around. > > Is there a way to create a constraint that will delete row 2 if I delete > row 1 using a substring of the vimname to match with the parentname?
AFAIK only by writing your own trigger. You could possibly get away with using the foreign key trigger code as a starting point. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster
