Page 1 of 1

Numeric data type

Posted: Tue Jan 04, 2011 10:10 pm
by agathaeleanor
Hi,

I have a ETL job that hit below error,

Column YEAR_MONTH floating point decimal is not fully supported; adjusting the scale.

Column YEAR_MONTH has been modified in sql as TO_NUMBER(TO_CHAR(COMBR.ETL_RUN_DATE,'YYYYMM'))

And the target column datatype has changed to integer or numeric still hitting the same error.

Need your help in this.
Thanks in advance.

Posted: Tue Jan 04, 2011 10:20 pm
by devesh_ssingh
can you be more specific abt ur requirment ...rather than error

Posted: Tue Jan 04, 2011 10:40 pm
by chulett
A little sparse on the details. Is this Oracle? Is your YEAR_MONTH column defined as a NUMBER in the table, i.e. unbounded with no precision?

Posted: Tue Jan 04, 2011 11:41 pm
by agathaeleanor
Yes, it is oracle DB.
The datatype defined as NUMBER(6) in oracle.

The desired output was to display,
example: ETL_RUN_DATE = 20101024
YEAR_MONTH will display "201010"

Posted: Wed Jan 05, 2011 2:47 am
by priyadarshikunal
as you are using to_number() and ETL_RUN_DATE = 20101024 which is not number(6). try using

Code: Select all

cast(TO_CHAR(COMBR.ETL_RUN_DATE,'YYYYMM'), number(6))

Posted: Wed Jan 05, 2011 7:09 am
by chulett
For Server, you don't really need the TO_NUMBER conversion. Try keeping just the TO_CHAR in your source SQL and simply move the result to the numeric field in your job.