Assuming that A.ID is a Positive INT (and not floating point) I would doSELECT COl1, Col2FROM TableA AS A JOIN ( SELECT Val, Col3, Col4, ... -- Just the columns you NEED! FROM TableB WHERE B.Val NOT LIKE '%[^0-9]%' ) AS B ON CONVERT(int, B.Val) = A.ID
This works around a couple of issues:IsNumeric() will be TRUE for floating point numbers, and some things like "1e2" which might be in your B.Val columnAlso:SELECT COl1, Col2FROM TableA AS A JOIN FROM TableB AS B ON B.Val NOT LIKE '%[^0-9]%' AND CONVERT(int, B.Val) = A.ID
may well fail because SQL does not guarantee to perform AND operations in order (there's a technical term for it - my ageing memory has temporarily forgotten! - procedural languages will evaluate "IF AAA AND BBB" by testing AAA first, and if that is False the BBB will not be evaluated at all. That is not necessarily the case in SQL, and thus the "CONVERT(int, B.Val) = A.ID" may attempt to be evaluated where B.Val is not a valid integer.