Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: PL/SQL and nulls
"Benetnasch" <nospam.benetnasch_at_blimey.co.uk> wrote in message news:<Fxm_6.22451$cw.1277679_at_monolith.news.easynet.net>...
> Thanks for the suggestion - I'll have a look.
>
> Travis <otaupin_at_ifrance.com> wrote in message
> news:9hcr3u$t16$1_at_reader1.imaginet.fr...
> > Perhaps have you a ',' instead of '.' in one of your numerics fields !?
> >
> > Olivier.
> >
> >
> > Benetnasch <nospam.benetnasch_at_blimey.co.uk> a écrit dans le message :
> > F8m_6.22446$cw.1272909_at_monolith.news.easynet.net...
> > > I have a PL/SQL procedure which is inserting records into a database.
> > >
> > > The values to put into this database are taken from various variables
> > > that I have created.
> > >
> > > I'm getting the following error message when I try to insert into
> > > the database:
> > >
> > > "ORA-06502: PL/SQL: numeric or value error"
> > >
> > > ... because (I think) some of the variables are NULL. The corresponding
> > > columns in the table aren't "NOT NULL", though.
> > >
> > > What am I doing wrong?
> > >
> > > Any help'd be appreciated - thanks.
> > >
> > > --
> > > Benetnasch
> > > Remove "nospam."
> > >
If you still have a problem you might want to post a section of the code so we can see what you have. Normally a numeric or value error means you have a non-digit character in a character column that was involved in an attempt to convert it to number or your receiving field is shorter than the data (or numeric value) you try to store in it.
Examples:
v_1 number(4);
v_2 varchar2(5);
insert, fetch, or assignment of v_1 := 99999 and v_2 := 'RTOOBIG';
Since you are inserting then the table column could be too small to hold what you are attempting to insert.