Search code examples
sqloracle11gnullnvl

How to catch null vales and display comment


I have bascic query:

select col1, nvl(col1,to_number(null)) from table1 where colx = :new

UPDATE

baiscly, during upload I'm checking if :new is inside table1.colx. If yes, I want to display col1, if not null value (I can't put zero).


Solution

  • nvl(col1,to_number(null)) will return blank. You can change from that to this: nvl(col1,0).