Home » SQL & PL/SQL » SQL & PL/SQL » heu....help
heu....help [message #38995] Wed, 05 June 2002 06:20 Go to next message
JoJo
Messages: 18
Registered: January 2002
Junior Member
thanks for your support:
(i work with Oracle 8.0.6)
i made a procedure,in this procedure i have to query for a value and make some calculation with it:

query-----------------------------------------------
SELECT EVT.CODZN10 INTO zone10 FROM EVT WHERE EVT.CODSOC = CSOC/*parameter*/
AND EVT.ACHVTE LIKE ACVT
AND EVT.TYPEVE LIKE TYEV
AND EVT.NUMEVE = NUM
AND EVT.NUMPOS = POSTE
AND EVT.NUMBLO = 0
AND EVT.NUMSPO = 0
AND EVT.NUMLIG = 0;

ok,the codzn10 is a varchar2(12)and the query is correct,i have checked it through sql*plus.

The problem is after.When i want to make some calculation with it like:
quan1maj := ROUND (to_number(zone10) - (quantitecommandee * (poidsnet-poids)),5);

i thought it might work but it isn t.The problem seems to be the to_number statement,but if i don't put it,it still doesn t work.

If i do that :
dbms_output.put_line(zone10);

quan1maj := ROUND (to_number(zone10) - (quantitecommandee * (poidsnet-poids)),5);

dbms_output.put_line(zone10);

the first output will be shown but not the second.But i have the message that PL/SQL procedure is successfull!same thing if i don t put the to_number statement.

I'm lost,and weak...
i found my mistake,it s ok now. [message #39006 is a reply to message #38995] Thu, 06 June 2002 02:51 Go to previous message
JoJo
Messages: 18
Registered: January 2002
Junior Member
thanks
Previous Topic: 6502 PL/SQL: numeroc or value error
Next Topic: Help - Complex Query
Goto Forum:
  


Current Time: Fri May 17 21:16:03 CDT 2024