Foreign Key Constraint Based On View.
I have table which stores each department and a date column. This table has foreign key constraint on our department table to make sure that inserted department should be in dictionary table. Now, I would like to store another row for all departments. I can't do that because of constraint.
Can I create a view which will be union of all departments and another row for 'AAA' (all departments) and put foreign key constraint based on that view?
Or is there any easier way to achieve this other than disable the constraint or add row for all departments in a dictionary table.
Thanks your help and I will appreciate any help in this regard.
Vikas