Home » SQL & PL/SQL » SQL & PL/SQL » try this addition..
try this addition.. [message #4287] Mon, 25 November 2002 09:46 Go to next message
Sylvestre
Messages: 3
Registered: November 2002
Junior Member
Hello

I have the following var
nQtePal1 INTEGER;
nNewQte INTEGER;

When I try the following addition :
nQtePal1 := nQtePal1 + nNewQte ;

the result give by
dbms_output.put_line('pal: '||nQtePal1);
give nothing.

when I try nQtePal1 := nNewQte ;

the result is right, where is the problem, please..
I am in 7.3.4

Thanks
Re: try this addition.. [message #4291 is a reply to message #4287] Mon, 25 November 2002 11:48 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Has nQtePal1 been assigned a non-NULL value prior to the addition? If not, the result of any addition to a NULL value will be NULL.
YEAAAAAAAAHH, RIGHT ! [message #4307 is a reply to message #4287] Tue, 26 November 2002 09:01 Go to previous message
Sylvettrs
Messages: 1
Registered: November 2002
Junior Member
Thanks a lot, it works fine, that's right , I forgot
that we can't add to a null value.

Thank you.
Previous Topic: Counts and Group By
Next Topic: how to do a group by and count on the same column (similar to pivot table in excel)
Goto Forum:
  


Current Time: Mon Apr 29 12:52:35 CDT 2024