EXCEL Column Output = 2.00708E+12

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
bltcb
Participant
Posts: 3
Joined: Mon Dec 19, 2005 8:47 am

EXCEL Column Output = 2.00708E+12

Post 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
Mhasan
Participant
Posts: 38
Joined: Wed Apr 19, 2006 10:03 pm
Location: Bangalore

Post by Mhasan »

try using DFloatToStringNoExp
Thanks
M A hasan
bltcb
Participant
Posts: 3
Joined: Mon Dec 19, 2005 8:47 am

Post 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
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post 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
bltcb
Participant
Posts: 3
Joined: Mon Dec 19, 2005 8:47 am

Post 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
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

You might write it as text (so datastage puts quotes around it). I would expect excel to read it then.
John
Post Reply