I need some help on how to proceed with this problem :
I have the following SQL Server tables :
Transitions
ID int,
VariableID int,
To_VariableID int,
To_ValueID int,
To_CommentInput bit,
To_SP varchar(255)
Processes
ID int,
VariableID int,
ValueID int,
Manual_Value varchar(255)
What applies for
Transitions: Only one field among
To_VariableID,To_ValueID,To_CommentInput,To_SPcan be set at a time in each row.
In some cases I want certain data fromTransitionsto go toProcesses.
Now, if To_ValueID has been set in a row in Transitions, its value should go to the ValueID field in the Processes table.
If not, then the field that is filled ( don’t know which one, it could be To_VariableID, To_CommentInput, To_SP ) should go in the Manual_Value field.
Any help would be greatly appreciated!
Something like this, although your exact mapping may differ.