My select statement returns multiple rows and I want it to retrieve the one with the latest semester code. how do I do that?

select (something)
FROM RTATC,BTATC,TVSBGI
WHERE RTATC_SBGI_CODE = BTATC_SBGI_CODE
AND RTATC_SBGI_CODE = TVSBGI_CODE
AND RTATC_CRSE_NUMB_TRNS = BTATC_CRSE_NUMB_TRNS
AND RTATC_SUBJ_CODE_TRNS = BTATC_SUBJ_CODE_TRNS
and RTATC_CRSE_NUMB_TRNS ='M109'
and BTATC_TERM_CODE_EFF_TRNS = (I want the one with the greatest semester here which is 200540 from below results)

Especifically the ultimately remote thing. Can't you try the SQL statements now?
Edit:
The query selects the same you use to select before but it returns it order by the BTATC_TERM_CODE_EFF_TRNS column, after that it selects the top row from that select so in the end it selects the row with the highest semester value.
Joaquin

select (something)
FROM RTATC,BTATC,TVSBGI
WHERE RTATC_SBGI_CODE = BTATC_SBGI_CODE
AND RTATC_SBGI_CODE = TVSBGI_CODE
AND RTATC_CRSE_NUMB_TRNS = BTATC_CRSE_NUMB_TRNS
AND RTATC_SUBJ_CODE_TRNS = BTATC_SUBJ_CODE_TRNS
and RTATC_CRSE_NUMB_TRNS ='M109'---GET RID OF THIS
and BTATC_TERM_CODE_EFF_TRNS = (I want the one with the greatest semester here )

So I will have many more course numbers and the query will return all course numbers with the latest semester....