I have two Tables
Table A{
ColA1 - Key
ColA2 - Key
}
AND
Table B{
ColB1 - Key
ColB2 - Key
ColB3 - Key
}
The two fields in TableA correspond to ColB1 and ColB2
in TableB. The problem is ColB3 which is a DateTime field.
TableB is a log table for process' TableA has performed.
SQLServer will not let me add the FK constraint unless
all fields are mapped. i.e.
1 ColB3 does not form part of
TableBs Key or
2 I have a fields ColA3 in TableA to map
1 I need ColB3 to be part of the key because I will
be adding ColB1 and ColB2 into TableB more than once.
2 I don't what to have a new row in TableA for
each row in TableB. This would defeat the point of TableB
and would mean repeating additional data in TableA.
Any solutions
to ColB3 in TableB.
Table A{
ColA1 - Key
ColA2 - Key
}
AND
Table B{
ColB1 - Key
ColB2 - Key
ColB3 - Key
}
The two fields in TableA correspond to ColB1 and ColB2
in TableB. The problem is ColB3 which is a DateTime field.
TableB is a log table for process' TableA has performed.
SQLServer will not let me add the FK constraint unless
all fields are mapped. i.e.
1 ColB3 does not form part of
TableBs Key or
2 I have a fields ColA3 in TableA to map
1 I need ColB3 to be part of the key because I will
be adding ColB1 and ColB2 into TableB more than once.
2 I don't what to have a new row in TableA for
each row in TableB. This would defeat the point of TableB
and would mean repeating additional data in TableA.
Any solutions
to ColB3 in TableB.