J
John
Hi
I have table1 and table2 who have many to many relation. I have created a
table3 to resolve the single many to many into two one to many relations.
I need to select records from table1 and table2 but only if neither has a
corresponding "combined" record in table3 ie I am looking for something like
WHERE table1.field1 & table2.field2 not in (Select table3.field1 &
table3.field2 from table3),
but the fields are numeric so I can not concatenate them straight. Can I
instead use
WHERE table1.field1 not in (Select table3.field1 from table3) AND
table2.field2 not in (Select table3.field2 from table3)
as equivalent statement? Would that work or am I missing something?
Thanks
Regards
I have table1 and table2 who have many to many relation. I have created a
table3 to resolve the single many to many into two one to many relations.
I need to select records from table1 and table2 but only if neither has a
corresponding "combined" record in table3 ie I am looking for something like
WHERE table1.field1 & table2.field2 not in (Select table3.field1 &
table3.field2 from table3),
but the fields are numeric so I can not concatenate them straight. Can I
instead use
WHERE table1.field1 not in (Select table3.field1 from table3) AND
table2.field2 not in (Select table3.field2 from table3)
as equivalent statement? Would that work or am I missing something?
Thanks
Regards