Skip to content
Advertisement

Oracle SQL column tweak

How could I convert this

enter image description here

into this?

enter image description here

Advertisement

Answer

You can use coalesce() and a case expression:

EDIT:

You should fix your data model. Until then, you can cast() the values:

You don’t really need to cast both values, but I don’t want to remember which column has which type.

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