Type Conversion

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
ketanshah123
Participant
Posts: 88
Joined: Wed Apr 05, 2006 1:04 am

Type Conversion

Post 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
rohithmuthyala
Participant
Posts: 57
Joined: Wed Oct 21, 2009 4:46 am
Location: India

Post by rohithmuthyala »

Can you provide more details about the column...? What is the datatype in the source Database....!!
Rohith
ketanshah123
Participant
Posts: 88
Joined: Wed Apr 05, 2006 1:04 am

Post by ketanshah123 »

It is SQL database and dataype is float
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
ketanshah123
Participant
Posts: 88
Joined: Wed Apr 05, 2006 1:04 am

Post by ketanshah123 »

I am reading it from sql server tbable as float and inserting it into the sql server table .
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

In that case, you should have no problems. The notation in the e-exponent form is just when you display the data.
ketanshah123
Participant
Posts: 88
Joined: Wed Apr 05, 2006 1:04 am

Post by ketanshah123 »

thnx for the reply ...

is there any other way that I can convert it to decimal (10,3) ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

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

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

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