Home » SQL & PL/SQL » SQL & PL/SQL » INCREASE SUM FIELD LENGTH
INCREASE SUM FIELD LENGTH [message #902] Tue, 12 March 2002 00:17 Go to next message
Tina
Messages: 38
Registered: November 2001
Member
I am carrying out a simple SUM clause in an Insert statement

CREATE OR REPLACE PROCEDURE "ABC"."CALC"
AS

BEGIN

INSERT INTO ABC.DAILY
(SELECT TYPE,
SUM(BALANCE)
FROM ABC.DEPOSIT
GROUP BY TYPE)

TYPE being a VARCHAR2 (Description field)
BALANCE being a NUMBER(15,2)


However, the SUM(BALANCE) field is only inserting the first 10 digits, and there I am loosing some of the figure. Please can you advise me on how I can increase the size of this field, whilst summing and inserting in a procedure.

I have tried to use EXECUTE IMMEDIATE 'set numwidth 20', but this produces error ORA-21000 and ORA-06512.

Any help would be much appreciated. I am using Oracle 8.1.6.
Many Thanks
Re: INCREASE SUM FIELD LENGTH [message #903 is a reply to message #902] Tue, 12 March 2002 00:31 Go to previous message
Tina
Messages: 38
Registered: November 2001
Member
Also just to add, the size of the table I am inserting into is not the problem, this field is more that ten digits.
Previous Topic: button_palette
Next Topic: Re: OLE2
Goto Forum:
  


Current Time: Fri Apr 19 16:21:10 CDT 2024