Page 1 of 1

EXCEL Column Output = 2.00708E+12

Posted: Fri Sep 21, 2007 8:18 am
by bltcb
Hello,

I'm new to this forum, hope I'm in the correct place!
Quick question.,.
I am reading an Oracle db, the column is varchar2(13). I have defined the column as VarChar (13) in DS Oracle Enterprise stage. The data contains information like 2007092112345. Going thru a transformer as VarChar (13), ending up in a sequential file as the same datatype. The sequential file is defined as tab delimited. When the file is opened in EXCEL, it shows 2.00708E+12
I have tried to change the datatype in each stage, but still get the same results.
How can I make this be the regular number and show 2007092112345 in EXCEL?
Any help would be greatly appreciated!
Thanks,
Barbara

Posted: Fri Sep 21, 2007 8:46 am
by Mhasan
try using DFloatToStringNoExp

Posted: Fri Sep 21, 2007 9:24 am
by bltcb
Thanks, but I can't find any information on how to use this TYPE CONVERSION. In the transformer stage, I see this under type conversion, but the syntax is not very helpful:

DFloatToStringNoExp(%number%,%scale%)

Should I keep the datatype as VARCHAR? Do I need to add a MODIFY stage?

Do you have an example?

Thanks in advance for your help!
Barbara

Posted: Fri Sep 21, 2007 9:37 am
by ds_developer
It is an Excel issue - highlight the column, right mouse and go to Format Cells... change the type to Number with 0 decimal places and no 1000 separator. It will work with your E+12 data. I know I've done it with E+14, but at E+18 it loses precision (I don't know where the exact cut-off is).
Hope this helps,
John

Posted: Fri Sep 21, 2007 9:44 am
by bltcb
Yeah, I have already taken that approach in EXCEL, but the user doesn't want to have to do that! I figured I could do it in DS and resolve the issue from the start.

Still looking at documentation to try to solve in DS.,.
Thanks,
Barbara

Posted: Fri Sep 21, 2007 11:19 am
by ds_developer
You might write it as text (so datastage puts quotes around it). I would expect excel to read it then.
John