Values from the query cannot match.
Look carefully at this part of the query.
select ..., ifsc, .....
from rtgbrn_temp
where ifsc in (........
.........
MINUS
SELECT ifsc_code
FROM bbbt )
This query retrieves ifsc
codes that are not equal to any ifsc_code
in bbbt
table.
Then the query uses these codes to match records:
on (x.ifsc = b.ifsc_code)
the above is eqivalent to
on (subquery.ifsc = bbbt.ifsc_code)
because x
is an alias of the subquery, and b
is the bbbt
table name.
Think a while ....
The subquery returns only codes that are not equal to any value of bbbt.ifsc_code
It means, that the condition subquery.ifsc = bbbt.ifsc_code
never matches.