0 CAST AS DECIMAL(22,7) showing as 0E-7 in Result Set

Teradata Studio
Teradata Employee

0 CAST AS DECIMAL(22,7) showing as 0E-7 in Result Set

In querying a table that has a column with datatype DECIMAL(22,7), it shows 0E-7 for 0 values in the result set.

To illustrate:

SEL 0 (DECIMAL(22,7));

Result:

0E-7

SEL 1 (DECIMAL(22,7));

Result:

1.0000000

Why is it doing that?

1 REPLY
Teradata Employee

Re: 0 CAST AS DECIMAL(22,7) showing as 0E-7 in Result Set

@EB180000, The data is displayed as it is returned from the database. If you enable the 1000's separator preference for the Result Set Viewer, it will format the result and display 0.0000000. We have are working on improvements in Studio and Studio Express in this area.