So it actually reads the old statement as
SELECT
S.IIATransactionId,
substring(rats_filename, 1+patindex('%{________-____-____-____-____________}%', rats_filename), 36) AS OracleTransactionId
FROM
iiafeedtransaction S
LEFT OUTER JOIN
ratsiiafeedtransaction o
ON
S.IIATransactionId = substring(rats_filename, 1+patindex('%{________-____-____-____-____________}%', rats_filename), 36)
and
o.Rats_filename IS NULL
ORDER BY
S.IIATransactionId