Backboards: 
Posts: 153
In response to "SQL question. I can wind up exporting to Excel and doing it that way but trying to learn." by Dano

I would do a LEFT JOIN to the other table.

SELECT
*
FROM
table_one t1
LEFT JOIN table_two t2
on concat('##', t2.blah) = t1.blah
WHERE
t2.blah is NULL
--------------

where blah is the column name(s) that are alike

Essentially, you want everything in table_one, and LEFT join to table_two, and your WHERE clause is saying "return everything in table_one where it doesn't exist in table_two" (i.e. is NULL).


Post a message   top
Replies are disabled on threads older than 7 days.