Skip to content
Advertisement

Eliminate duplicate values and replace them with null values oracle?

I have a table like

But my desired table is

Rule here is Replacing dest2 by null if it appears once and Replacing dest1, dest2 by null if dest1 appears once…

Advertisement

Answer

You seem to be null’ing out dest2 after it appears once, and the pair when both appear. Assuming that source provides the ordering, you can do:

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