Page 1 of 1
Decimal to Character
Posted: Tue Sep 02, 2008 7:59 am
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
Re: Decimal to Character
Posted: Tue Sep 02, 2008 8:05 am
by sachin1
Inputcolumn[1,4] should work.............
Re: Decimal to Character
Posted: Tue Sep 02, 2008 8:44 am
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".
Posted: Tue Sep 02, 2008 8:51 am
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.
Posted: Tue Sep 02, 2008 9:05 am
by monaz
Thanks it has been worked out...
Decimal to character
Posted: Wed Jan 28, 2009 11:24 pm
by fareeda_b
Hi,
you can use "decimalTo String function" in transformer stage .
Hope it will help you.
thanks
fareeda
Decimal to character
Posted: Wed Jan 28, 2009 11:24 pm
by fareeda_b
Hi,
you can use "decimalTo String function" in transformer stage .
Hope it will help you.
thanks
fareeda
Posted: Thu Jan 29, 2009 7:36 am
by chulett
It won't because a) they resolved this several months ago and b) there's no such function in the Server edition.