Exporting to an excel

General
Fan

Exporting to an excel

Hi,

I have been trying to export the answer set from teradata to an excel sheet. I have a column with datatype decimal (15,0). When I try to export it, this column is displayed in scientific notation. I tried to cast it as char,varchar and number. But it is displayed in the same format only. I don't want to change the format in excel after exporting. Since it is an automation process, I cannot do anything manually.
It will be great if someone helps on this... Thanks in advance.
6 REPLIES
Enthusiast

Re: Exporting to an excel

Try using the 'Format' in your query .

Enthusiast

Re: Exporting to an excel

Try using the cast with 'Format' in your query

Fan

Re: Exporting to an excel

I tried with Format z'99999999999'. It didnt work..Could you please give some example if it worked for you?Thanks in advance.

Teradata Employee

Re: Exporting to an excel

The file exported from TD is not in scientific notation. This reformatting when reading delimited text input is an Excel "feature". The only way I know of to avoid the reformatting is to concatenate a non-blank, non-numeric character to the exported field; but then the value is considered text rather than numeric.

Maybe a better approach to automate this would be to apply the formatting to a "template" spreadsheet and have Excel fetch the data from TD.

Fan

Re: Exporting to an excel

Hi Fred,

Thanks for the reply.

I cannot concatenate any character to the value since it is an important field. And i dont really understand this one 'apply the formatting to a "template" spreadsheet and have Excel fetch the data from TD.' I am exporting the file to excel with the help of a mainframe job. So i cannot make any changes in the spread sheet.

Teradata Employee

Re: Exporting to an excel

Teradata supports connections directly from Windows and Unix / Linux clients; Excel can use the Teradata ODBC driver as a data source.