View Single Post
  #3   Report Post  
Candyman
 
Posts: n/a
Default

When I do that the number comes out as an exponential. It is 19 digits long.
To get rid of the exponential I have to convert to a number... Then it shows
as rounded again! Hmmm

"Duke Carey" wrote:

Don't change your query, but before pasting format the cells in Excel as text

"Candyman" wrote:

I run a query against DB2 and receive the complete number (a number feild).
But when i cut and paste into Excel the values change. Why?
Excel is rounding the ID number:
6506508818150199801 to 6506508818150200000
6506508804141199801 to 6506508804141200000

my work around was a modified statement in the SQL:
'`' || cast (ACCT.CUST_ACCT_ID as char(20)) CUST_ACCT_CHAR_ID which results
in `6506508818150199801. This pastes into Excel without rounding, but the "`"
is still there.