Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: ORA-01438: value larger than specified precision allows for this column

Re: ORA-01438: value larger than specified precision allows for this column

From: Jim Kennedy <kennedy-family_at_attbi.com>
Date: Mon, 28 Oct 2002 14:50:29 GMT
Message-ID: <V8cv9.109024$Hj7.58197@rwcrnsc53>


if v_god is a number then declare it as a number not a string. is godina a number? if so then v_god should be number not string. Jim
"Jasna Prester" <jasna.prester_at_viadukt.tel.hr> wrote in message news:apj28q$4em8$1_at_as201.hinet.hr...
> Hi everyone,
>
> Probable this looks as a trivial problem to all of you but it seems huge
to
> me. The point is that I have one table from which I want to insert sums
into
> other. Now, the second table is the exact replica of the first, except
that
> I enlarged all the fields so that all the sums can fit in - but - I still
> get the same error.
>
> I checked the overall sum and it doesnt exceed the precision of eny field.
>
> The SQL I'm doing it with is:
>
> DECLARE
> V_GOD VARCHAR2(4);
>
> BEGIN
>
> V_GOD:='2002';
>
>
> DELETE FROM OS_TROS_GOD WHERE GODINA=V_GOD;
> COMMIT;
>
>
>
> INSERT INTO OS_TROS_GOD ( OS, MJESEC, GOD, "SATI VOZNJE", "SATI ZASTOJA",
> "VRIJEDNOST RADA", "SATI ODRZAVANJA", "IZNOS ODRZAVANJA",
"IZNOS
> MATERIJALA",
> "KOL GUMA", "VRIJED GUMA", "KOL NAFTE", "IZNOS NAFTE", "KOL
> MAZIVA",
> "IZNOS MAZIVA", "KOL ULJA", "IZNOS ULJA", AKUMULATORA, "IZNOS
> AKUMULATORA",
> "UKUP KM", "TROSK 3 LICA I OSTALI TROSK", AMORTIZACIJA, TONA,
> KUBIK,
> "KOL BENZINA", "IZNOS BENZ", INVEST, GODINA, PRAZNO, DATUM )
> SELECT OS_TROSKOVI.OS, Max(OS_TROSKOVI.MJESEC) AS MaxOfMJESEC,
> Max(OS_TROSKOVI.GOD) AS MaxOfGOD,
> Sum(OS_TROSKOVI."SATI VOZNJE") AS SV, Sum(OS_TROSKOVI."SATI
> ZASTOJA") AS SZ,
> Sum(OS_TROSKOVI."VRIJEDNOST RADA") AS SR,
> Sum(OS_TROSKOVI."SATI ODRZAVANJA") AS SO,
> Sum(OS_TROSKOVI."IZNOS ODRZAVANJA") AS IO,
> Sum(OS_TROSKOVI."IZNOS MATERIJALA") AS IM,
> Sum(OS_TROSKOVI."KOL GUMA") AS KG,
> Sum(OS_TROSKOVI."VRIJED GUMA") AS VG,
> Sum(OS_TROSKOVI."KOL NAFTE") AS KN,
> Sum(OS_TROSKOVI."IZNOS NAFTE") AS INAF,
> Sum(OS_TROSKOVI."KOL MAZIVA") AS KM,
> Sum(OS_TROSKOVI."IZNOS MAZIVA") AS IMA,
> Sum(OS_TROSKOVI."KOL ULJA") AS KU,
> Sum(OS_TROSKOVI."IZNOS ULJA") AS IU,
> Sum(OS_TROSKOVI.AKUMULATORA) AS SA,
> Sum(OS_TROSKOVI."IZNOS AKUMULATORA") AS IAK,
> Sum(OS_TROSKOVI."UKUP KM") AS UKKM,
> Sum(OS_TROSKOVI."TROSK 3 LICA I OSTALI TROSK") AS SOT,
> Sum(OS_TROSKOVI.AMORTIZACIJA) AS SumOfAMORTIZACIJA,
> Sum(OS_TROSKOVI.TONA) AS SumOfTONA,
> Sum(OS_TROSKOVI.KUBIK) AS SumOfKUBIK,
> Sum(OS_TROSKOVI."KOL BENZINA") AS KB,
> Sum(OS_TROSKOVI."IZNOS BENZ") AS IB,
> Sum(OS_TROSKOVI.INVEST) AS SumOfINVEST,
> Max(OS_TROSKOVI.GODINA) AS MaxOfGODINA,
> Count(OS_TROSKOVI.PRAZNO) AS CountOfPRAZNO,
> Max(OS_TROSKOVI.DATUM) AS MaxOfDATUM
> FROM OS_TROSKOVI
> GROUP BY OS_TROSKOVI.OS;
>
>
>
> END;
> /
>
>
>
> and the error I get is:
>
> Input truncated to 1 characters
> DECLARE
> *
> ERROR at line 1:
> ORA-01438: value larger than specified precision allows for this column
> ORA-06512: at line 14
>
>
> The Oracle database is version 8.1.7, enterprise edition.
>
>
> If anyone can help with any sugestion, I would be very grateful.
>
>
>
> Jasna Prester
>
>
Received on Mon Oct 28 2002 - 08:50:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US