Teradata Error 2616 on Decimal Fields Calculations

Database
Fan

Teradata Error 2616 on Decimal Fields Calculations

Hello!

We are facing Error 2616 with Decimal Fields Calculations.

An example query is "SELECT 1090000521267.0000/0.585274".

Would you recommend changing MaxDecimal parameter in dbscontrol settings?? At the moment it has the value 15.

Is there an impact in changing the above mentioned parameter?

 

Regards,

Elena.

2 REPLIES
Apprentice

Re: Teradata Error 2616 on Decimal Fields Calculations

Hi Elena,

 

The obvious alternative to changing DBSControl is to use CAST in the affected SQL statement, such as:

SELECT CAST(1090000521267.0000 AS DECIMAL(38,4))/0.585274

 (whether DECIMAL(38,4) is the right data type or not is another question).

 

The impact of changing that setting in DBSControl is that it may affect multiple SQL statements - because it is a system-wide setting.

If you change DBSControl I would think that most statements that get affected will not have a problem. The ones that may have a problem are:

- "CREATE TABLE ... AS ... SELECT" where the SELECT includes a division that generates the resulting data type. This may (or may not) cause a subsequent problem. For subsequent processing is that data type significant?

- A "SELECT" statement which includes a division and exports data from TD and that data is read by another application. If the data type of one of the exported columns changes then again it may (or may not) cause a problem.

 

Does that help?

 

Cheers,

Dave

Ward Analytics Ltd - information in motion
www: http://www.ward-analytics.com
Fan

Re: Teradata Error 2616 on Decimal Fields Calculations

Yes, it helps!

 

Thank you Dave :-)