0

I have a set of data in varchar2 format. Some of the data has trailing zeroes (the field is a concatenation of 3 separate varchar2 fields, with a . [dot] separating them). When I try to export the data to Excel 2016, it will drop any trailing zero. Is there a command I can use to convert these varchar2 fields to text fields within SQL? I tried to_text but that doesn't work. Sample of the data:

CR acct DB acct GL Interface Amount

9200.5030 1.1310.1 4658 14436.52

9200.5030 1.1310.1 4659 2254.64

9200.5030 1.1310.1 4660 10894.77

9200.5030 1.1310.1 4662 279315.98

9200.5030 1.1310.1 4664 48014.37

The export to excel will show the first column as 9200.503 Even when I format the cells in Excel to be text fields, the trailing zero is lost.

Any thoughts? Thanks Elizabeth Felet

  • tell excel that it's a string-type field when you import it? otherwise export in some format that preserves field metadata so excel can KNOW it should be a text field, and not a numeric one. – Marc B Apr 25 '16 at 20:22
  • Thanks for the info. I formatted the columns in my Excel spreadsheet first to accept the data in the format I wanted it, then copied the data there - worked perfectly. – Elizabeth Felet Apr 28 '16 at 13:44

0 Answers0