Page 1 of 1

FLOAT TO VARCHAR ??

Posted: Sat Sep 15, 2007 6:41 am
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

Posted: Sat Sep 15, 2007 7:35 am
by chulett
You haven't said what exactly your issue is. It would also help if you posted your actual derivations.

Posted: Sat Sep 15, 2007 7:49 am
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

Posted: Sat Sep 15, 2007 8:24 am
by chulett
That's how View Data displays a float. Have you tried writing it to your target and viewing it there yet?

Posted: Sun Sep 16, 2007 1:34 am
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

Posted: Thu Sep 20, 2007 12:01 pm
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

Posted: Fri Sep 21, 2007 4:28 am
by Mhasan
rwierdsm So how to convert It..

Posted: Fri Sep 21, 2007 4:48 am
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.

Posted: Fri Sep 21, 2007 5:02 am
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....

Posted: Fri Sep 21, 2007 5:10 am
by Mhasan
Now how to put this value in Oracle db in VArchar format ..pleae suggest