Mark Tabor

Mark Tabor

  • 572
  • 1.9k
  • 431k

NVL WITH SUM FUNCTION RETURN ERROR ORA INVALID NUMBER

Feb 25 2022 5:50 AM

Hi I have a query like below and my Distribution columns in database is having number from 1-100 , as well as null some people type 90 some type 090 when performing the action it gives this below error 

An error was encountered performing the requested operation

ORA-01722 INVALID NUMBER 

01722 00000 INvalid Number

Cause : The specified number was invalid

Action : specify a valid number vendor code 1722 

 

 

HERE IS MY QUERY 

SELECT NVL(SUM(NVL(mt.Distributed,0)),0) DISTRIBUTED_AMOUNT from TBL_DISTRIBUTION mq,Client information mt 

where mq.id=mt.id


Answers (3)