Decimal to Character

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
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Decimal to Character

Post by monaz »

Hi my requirment is to convert decimal to character by Truncating decimal.How to implement this..

For Example
Input is Decimal(17,4)
as 128119000.000


OUTPUT should be Char(4)
1281


Can i do it in Sybase database itself or Datastage.
Please advice me on this... ASAP
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Decimal to Character

Post by sachin1 »

Inputcolumn[1,4] should work.............
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Re: Decimal to Character

Post by monaz »

is it not necessary to convert decimal to character...I tried working with CONVERT function but i am getng the below warring.
"Insufficient result space for explicit conversion of NUMERIC value '128119000.00' to a CHAR field".
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You do not need to apply any functions for type convertions. Its seamless in server edition, as beneath the covers, everything is a char.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
monaz
Participant
Posts: 98
Joined: Sat Aug 23, 2008 3:14 am

Post by monaz »

Thanks it has been worked out...
fareeda_b
Participant
Posts: 48
Joined: Sat Feb 23, 2008 4:25 pm

Decimal to character

Post by fareeda_b »

Hi,

you can use "decimalTo String function" in transformer stage .


Hope it will help you.


thanks
fareeda
Thanks
fareeda_b
Participant
Posts: 48
Joined: Sat Feb 23, 2008 4:25 pm

Decimal to character

Post by fareeda_b »

Hi,

you can use "decimalTo String function" in transformer stage .


Hope it will help you.


thanks
fareeda
Thanks
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

It won't because a) they resolved this several months ago and b) there's no such function in the Server edition.
-craig

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