SELECT
CCY1, CCY2, CER.Exchange_Rate
FROM
(
SELECT
c1.rec_id AS rec_id1, c1.currency AS CCY1,
c2.rec_id AS rec_id2, c2.currency AS CCY2
FROM
currency c1
CROSS JOIN --all combinations...
currency c2
WHERE
c1.rec_id <> c2rec_id -- ...removes same pairs
) foo
LEFT JOIN -- ...get matching FX pairs
CurrencyExchangeRate CER ON foo.rec_id1 = cer.[from] AND foo.rec_id2 = cer.[to]