Subject Re: [ib-support] Re: Avoiding a delete
Author Martijn Tonies
Hi,


> I can't use a Referential Constraint as this is the 'wrong way round'.
> I am not sure how to get the trigger working properly
> It should look something like :

Why is this the wrong way round?

I believe you said you have a table Sales with a column Dealer that's
pointing to table Dealers and a Dealer-record cannot be deleted if
there are any Sales records (that is, records pointing to records in the
Dealers table) - exactly the right way round.

If this is not the case, show some table metadata.

Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com

Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."