Numeric data type

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Numeric data type

Post 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.
devesh_ssingh
Participant
Posts: 148
Joined: Thu Apr 10, 2008 12:47 am

Post by devesh_ssingh »

can you be more specific abt ur requirment ...rather than error
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
agathaeleanor
Participant
Posts: 76
Joined: Mon Mar 05, 2007 9:26 pm
Location: Malaysia

Post 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"
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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))
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply