You can have a foreign key constraint that has multiple columns (compound),
but that combination must be a unique or primary key, that you can foreign key to.
If you dont have this then it looks like this functionality will require a trigger.
On SQL 2000 ( as against earlier versions ) you have two types of trigger.
For/After and InsteadOf.
With After triggers, as the name suggests the trigger fires after the row has
already been inserted/deleted/updated and therefore any constraint checks passed
- but you can issue a rollback to abort the update. So you could put the
foreign key check in for the one field, and use the trigger to check for the not null other.
With an instead of trigger you have to do the insert/update/delete yourself,
so you have more control, and could do both checks in the trigger. It's how
things were programmed in the old days where there were no Declaritive
"tommy" <com> wrote in message news:google.com...