FLOAT TO VARCHAR ??

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
Mhasan
Participant
Posts: 38
Joined: Wed Apr 19, 2006 10:03 pm
Location: Bangalore

FLOAT TO VARCHAR ??

Post by Mhasan »

Hi ,

I have record in FLOAT ( 6.11232e+12)
Sourec is ODBC (Sqlserver) and target is Oracle Iam using Oracle enterprise stage

I need the above data in Varchar format .... Im using Dfloattostringnoexp and Dfloattodecimal

None of the above is resolving the issue...
please suggets
Thanks
M A hasan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You haven't said what exactly your issue is. It would also help if you posted your actual derivations.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mhasan
Participant
Posts: 38
Joined: Wed Apr 19, 2006 10:03 pm
Location: Bangalore

Post by Mhasan »

Hi

One of my input records looks like 6.87653e+08 (ODBC , sql server) when i click Veiw data.. datatype of this is Float.
In target i need this value in Varchar format ..How to do this?
and what is "rtype" one of the argument need to pass with DfloattoDecimal
Thanks
M A hasan
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's how View Data displays a float. Have you tried writing it to your target and viewing it there yet?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Mhasan
Participant
Posts: 38
Joined: Wed Apr 19, 2006 10:03 pm
Location: Bangalore

Post by Mhasan »

Have you tried writing it to your target and viewing it there yet?
-->When this not moving into target how will i see.. Yes i moved it directly without any conversion i can see.. 00000000000.

how should i get this in Varchar output
Thanks
M A hasan
rwierdsm
Premium Member
Premium Member
Posts: 209
Joined: Fri Jan 09, 2004 1:14 pm
Location: Toronto, Canada
Contact:

Post by rwierdsm »

Try dumping field out to a sequential file. There you will see what the source is actually sending you, rather than what it's data access tool is displaying. If it is still in scientific notation (i.e. 1.23 e04) when dumped out, then you will need to convert.

Rob
Rob Wierdsma
Toronto, Canada
bartonbishop.com
Mhasan
Participant
Posts: 38
Joined: Wed Apr 19, 2006 10:03 pm
Location: Bangalore

Post by Mhasan »

rwierdsm So how to convert It..
Thanks
M A hasan
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It may not require conversion. DO what was asked (send it to a text file) and tell us what you got in that file. Look at the file using a text editor, not View Data from DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Mhasan
Participant
Posts: 38
Joined: Wed Apr 19, 2006 10:03 pm
Location: Bangalore

Post by Mhasan »

Ray,

Without any conversion function im just dumping into a text file and Iam getting data something like this :-- 5.1219e+12
Above value is same as input data getting from source database...
please put your thoughts on this....
Thanks
M A hasan
Mhasan
Participant
Posts: 38
Joined: Wed Apr 19, 2006 10:03 pm
Location: Bangalore

Post by Mhasan »

Now how to put this value in Oracle db in VArchar format ..pleae suggest
Thanks
M A hasan
Post Reply