I have a table which contains columns like this:
- SomeId, Int PK
- Item1Weighting, Int
- Item2Weighting, Int
- Item3Weighting, Int
I want to add a constraint to the table that prevents the total of the three "weighting" columns on a single row exceeding a total value of 100.
I've done quite a bit of searching and can't find any help so any suggestions would be gratefully received.
Thanks Kev
You can do this declaratively without resorting to triggers.
Or to add it retrospectively to an existing table