How do I import all values from a different SQL Table only importing lines that have a non duplicate 'b' entry. Because 'b' symbols a unique string in my tables. Both tables have ca. 5mio entry's.
A_Table
structure
'id', 'a', 'b', 'c', 'd'
B_Table
structure
'a', 'b', 'c'
Add to A_Table from B_Table where 'A_Table.b' !found in 'B_Table.b'
Example:
A_Table
1, "a1", "Hallo1", "c", "d"
2, "a1", "Hallo2", "c", "d"
3, "a1", "Hallo3", "c", "d"
4, "a1", "Hallo5", "c", "d"
5, "a1", "Hallo7", "c", "d"
6, "a1", "Hallo8", "c", "d"
B_Table
"a2", "Hallo1", "c"
"a2", "Hallo2", "c"
"a2", "Hallo3", "c"
"a2", "Hallo4", "c"
"a2", "Hallo5", "c"
"a2", "Hallo6", "c"
"a2", "Hallo9", "c"
A_Table after query
1, "a1", "Hallo1", "c", "d"
2, "a1", "Hallo2", "c", "d"
3, "a1", "Hallo3", "c", "d"
4, "a1", "Hallo5", "c", "d"
5, "a1", "Hallo7", "c", "d"
6, "a1", "Hallo8", "c", "d"
7, "a2", "Hallo4", "c", ""
8, "a2", "Hallo6", "c", ""
9, "a2", "Hallo9", "c", ""