Page 1 of 1

Numeric value out of range

Posted: Tue Nov 16, 2010 8:21 am
by jpraveen
Hi All

i am getting the following error,
the columns having datatypes of char,bit,tinyint and timestamp(23,3)

but i am getting the error Numeric value out of range,
i dont know which column having error,i can view the data and when i view the data it's seem ok.
APT_CombinedOperatorController,1: [IBM(DataDirect OEM)][ODBC SQL Server Driver]Numeric value out of range
and one column specialtycode(tinyint) its getting negative values like -78,-24,-9 etc,
i think we should change into posive values
if so how to do this

Thanks in advance

Posted: Tue Nov 16, 2010 8:23 am
by chulett
For starters, a TinyInt is only a single byte so the values you've posted for it are definitely 'out of range'.

Posted: Tue Nov 16, 2010 2:00 pm
by ray.wurlod
(Signed) TinyInt has a domain of -128..+127. (Unsigned) TinyInt has a domain of 0..255. Check that your TinyInt is not unsigned.

Disable operator combination to learn which stage is throwing the error, and change array size to 1 to learn which row is throwing the error. At that time you may even be presented with the row data.

Posted: Tue Nov 16, 2010 11:33 pm
by jpraveen
Hi

i had converted tinyint into integer
convert(integer,SpecialtyCode) as SpecialtyCode

and my problem solved

Posted: Tue Nov 16, 2010 11:50 pm
by ray.wurlod
I suspect you had an unsigned TinyInt, then, and have changed it to a (not unsigned) Integer.