Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Help - number conversions
I can't imagine a problem inserting a C int into a NUMBER column unless it
declare NUMBER(2) and the int value is too large. I wouldn't expect that
particular error though.
I wonder if the problem lies elsewhere. Do you have a WHERE clause (I know it's an insert but you might be doing an INSERT INTO .. SELECT ...) where you are comparing a character column with a numeric constant to pull out all records where char field holds a particular number value. This is where I normally see this particular error. It sometimes transpires that there becomes an implicit TO_NUMBER of the character field for the comparison rather than the 'hoped for' TO_CHAR of the number constant. Because not all the char values are actually numeric, BANG, ORA 1722 Invalid number.
Worth a look.
--
Alan D. Mills
Nick Lehane wrote in message <01be08ab$fd9283a0$0159ea9e_at_mothergoose>...
>Hi everyone,
>
>I've got a question regarding conversions.
>I'm running a function from a dll and am trying to insert a C integer value
>into a number field.
>
>I keep getting SQLCode of -1722 and an SQLState of 42000.
>
>Is there some sort of conversion issue I should know about, like declaring
>number fields as floats or something?
>
>Any help would be much appreciated.
>
>Thanks,
>Nick
Received on Thu Nov 05 1998 - 10:17:20 CST