Ok, So I'm a bit new at SQL Server, and I've researched this everywhere but cannot find a clear answer and/or sample code for a solution:
-I have a table [Indicators] that has a bunch of fields including [MOE] field and a [Indicator_Selector] field, and the [INDid] field, which is the PK.
-My goal is to auto-generate the [INDid] field (PK) from concatenating the [MOE] and [Indicator_Selector] fields. so... [INDid]=[MOE]+[Indicator_Selector].
---
My first option was to make the [INDid] field a calculated field, which worked, and it even let me set it as a PK... BUT, SQL server does NOT allow this field to be a FK on a different table, which is crucial for my database. SO... I am told that a TRIGGER can do the trick, and I have found some samples on the internet, but none of them work correctly and are poorly explained.
Can anyone help me please? Thanks in advanced!!!