| Formula Column return Null value ???? [message #181281] | 
			Sat, 08 July 2006 02:06   | 
		 
		
			
				
				
				
					
						
						kamran.it
						 Messages: 265 Registered: September 2005  Location: Karachi
						
					 | 
					Senior Member  | 
					 | 
		 
		 
	 | 
 
	
		===report 6i== 
 
there is 2 fields qty1 and qty2 
qty1 has data but qty2 has not any data  
but when I execute this function it return null value while qty1 has values.Why??? 
 
 
function CF_1Formula return Number is 
temp number; 
begin 
  temp:= :qty1+:qty2; 
  return(temp); 
end;
		
		
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 | 
	| 
		
 | 
	| 
		
 | 
	
		
		
			| Re: Formula Column return Null value ???? [message #181328 is a reply to message #181281] | 
			Sat, 08 July 2006 14:30    | 
		 
		
			
				
				
				
					
						
						dude4084
						 Messages: 222 Registered: March 2005  Location: Mux
						
					 | 
					Senior Member  | 
					 | 
		 
		 
	 | 
 
	
		Hi 
 
Rule of thumb 
 
"Null multiplied into anything  will result in NULL" 
 
So if the :Quantity  or :Pes_quantity will have NULL then it will reult NULL in Temp or Temp1. 
 
Remedy: 
Use NVL function as follow: 
 
 
NVL(:Quantity,0)   instead of   :Quantity   
 
and  
 
NVL(:Pes_quantity) instead of   :Pes_quantity  
 
-Dude
		
		
		
 |  
	| 
		
	 | 
 
 
 | 
	| 
		
 |