Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: BDS - Genero Migration - SQL and precision  (Read 7794 times)
Stephen T.
Posts: 114


« on: October 25, 2013, 10:40:32 am »

This is akin to the scaling issue.
If something is SUM'd (or presumably any SQL command that performs arithmetic) and the value exceeds the scale (precision) of the target variable, in BDS the code continues and in Genero the program aborts with a precision error.
The problem was noticed on SUMs - hence its use in the example below (I know it's not necessary ;-)).

IE code extract:

 DEFINE l_total                                    DEC(8,2)

...
    SELECT SUM(1000*1000) INTO l_total
        FROM some_table

    DISPLAY 'Got Total (',l_total,')'

Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines