Page 1 of 1

Type Conversion

Posted: Wed Mar 31, 2010 5:22 am
by ketanshah123
some of the values in column are coming as 1.00088e+06 I want it to convert it in a number/numeric format . so can I do this ?

job is

odbc stage --->transfrmer----->odbc stage

Posted: Wed Mar 31, 2010 5:25 am
by rohithmuthyala
Can you provide more details about the column...? What is the datatype in the source Database....!!

Posted: Wed Mar 31, 2010 5:37 am
by ketanshah123
It is SQL database and dataype is float

Posted: Wed Mar 31, 2010 5:42 am
by ArndW
If you are reading this from a file or converting from a string, just declare your data type a float and you are good to go.

Posted: Wed Mar 31, 2010 5:59 am
by ketanshah123
I am reading it from sql server tbable as float and inserting it into the sql server table .

Posted: Wed Mar 31, 2010 7:02 am
by ArndW
In that case, you should have no problems. The notation in the e-exponent form is just when you display the data.

Posted: Wed Mar 31, 2010 7:42 am
by ketanshah123
thnx for the reply ...

is there any other way that I can convert it to decimal (10,3) ?

Posted: Wed Mar 31, 2010 7:44 am
by chulett
Any way other than automatically? Something wrong with what was posted? Have you tried it and then checked in SQL Server outside of DataStage? :?

Posted: Wed Mar 31, 2010 8:20 am
by ArndW
ketanshah123 - have you actually looked at the manual? In the functions appendix of the Parallel Job Developer's Guide there are CAST functions which you can use.