SELECT * FROM supermag.smspecrlbase WHERE CONCAT(CONCAT(basedocid,basedoctype),basespecitem) NOT IN (SELECT CONCAT(CONCAT(docid,doctype),specitem) FROM supermag.smspec)
SELECT * FROM supermag.smspecrlbases t1 LEFT JOIN supermag.smspec t2 ON CONCAT(CONCAT(t1.basedocid, t1.basedoctype), t1.basespecitem) = CONCAT(CONCAT(t2.docid, t2.doctype), t2.specitem) WHERE t2.docid IS NULL
SELECT * FROM supermag.smspecrlbases t1, supermag.smspec t2 where t1.basedocid=t2.docid(+) and t1.basedoctype=t2.doctype(+) and t1.basespecitem=t2.specitem(+) and t2.docid IS NULL