Benson, William (GE Global Research, consultant)
Benson at ge.com
Tue Mar 27 00:38:54 CDT 2012
I have two tables, A and B. Table A has field Fld1 which is indexed but non-unique, so has records like: X X X Y Z Z Z Z Table B has a foreign key to Fld1, and has values like: X X Z Z Z I don't want to be able to add a value "P" in table B which does not exist in Table A. I do not seem to be able to set up a relationship between these with referential integrity. Is it because of the repetition within Fld1 in Table A? If so, it would seem that the remedy is going to be to create a primary key in Table A and a foreign key to THAT in Table B instead of (or in addition to) the one on Fld2. But oh, I really don't want to do this. Is there maybe some other problem, or is it the repetition causing this issue, as I suspect?