Hi Gulsah,
I hope for this case, it is not required to use inner join concept, since we are fetching single entry.. First fetch the value from RESB Table and then fetch from AFPO Table. Try Select UP TO 1 rows instead of select single.
Regards
Rajkumar Narasimman