Skip to content
Advertisement

How to remove duplicate rows from a join query in oracle? [closed]

I have two tables bc_transactions & bc_messages. I used the below query to join these two tables

the bc_messages table has multiple rows with status as ERROR TRANSPORT which have the same USER_MESSAGE_ID at different timestamp(bm.TS). I am trying to get only the latest row.

Advertisement

Answer

You can use row_number() :

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement