INCREASE SUM FIELD LENGTH [message #902] |
Tue, 12 March 2002 00:17 |
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
|
|
|
|