How Numeric and Money Data Is Displayed
For the money and various numeric data types, a default display format and field width is set that is appropriate for the data type and width of the corresponding database column. If these defaults do not meet your needs, you can edit the data display format accordingly.
However, if you make the width of a column on a report or a data window in a form too small for the value that is to be printed or displayed there, the field is filled with asterisks. For example, if you attempt to print or display the value 667298 in a field with a data display format set at i5, five asterisks are printed or displayed in the field instead.
When you use Ingres programs to enter data into a table from a field that has a numeric display format, such as integer (i), the value entered is checked to make sure it can be stored correctly in the corresponding database column. For example, the value for an integer1 column must be between ‑127 and +127. In customized applications, this checking is not always automatic; you may need to use your application code to perform the check.
For floating point and decimal numbers, which have decimal fractions, you can specify the number of places to the right of the decimal point. When the data is displayed, it rounds the value to fit the number of specified places, if necessary. To specify scientific notation, use the format symbols e, g, or n.
Make sure that the display format is wide enough to include symbols such as plus (+) and minus (‑) if your data uses them. When using a form for queries, you can make the display window wider than the underlying column to allow two extra spaces for comparison operators.
You can also use a numeric template for the specialized display of numeric data. Specify characters in the template that tell Ingres what to do with each digit in the data that is being displayed or entered. When using a numeric template, the width of the field on a form or in a report is determined by the number of characters in the template. For example, the template $$$,$$$.nnDb allows for a maximum of 6 digits to the left of the decimal point plus a comma, and 2 digits to the right of the decimal point plus a two‑character Credit/Debit symbol. For more information, see
Numeric Templates.
Last modified date: 08/28/2024