Decimal Literals
The preprocessor distinguishes between decimal and floating-point literals in SQL and Forms Runtime System (FRS) statements according to the following rules:
• A literal containing a decimal point with no E notation is a decimal literal.
• A literal with E notation is a floating-point literal.
For example:
exec sql insert
into mytable (salary) values (23000.12)
exec sql insert
into mytable (number) values (1.4E4)
A numeric literal with or without the E notation is treated as a float if it is in the host declaration section.
In addition, the preprocessor treats integer literals greater than MAXINT as decimals. This allows host programs to input large integer values.
Ingres will treat '23000.00' as a decimal literal and '1.4E2' as a float literal.
However, applications will continue to use host language rules for interpreting literals appearing in host declarations. For example:
exec sql begin declare section
integer 2 i (1.234)
exec sql end declare section
The literal '1.234' is interpreted according to the Pascal compiler rules.
This is consistent with the Ingres convention of interpreting SQL statements according to SQL rules and host statements according to host language compiler rules.