Salesforce

Default calculations for SQL width

« Go Back

Information

 
TitleDefault calculations for SQL width
URL NameP17985
Article Number000156653
EnvironmentProduct: Progress
Version: 9.1D, 9.1E
Product: OpenEdge
Version: 10.x, 11.x, 12.x
OS: All supported platforms
Question/Problem Description
What are the default calculations for SQL-92 Width
What are the Data Type in SQL-92 Width
What is the default size of the NUMERIC data type
Steps to Reproduce
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
Resolution
The current SQL-92 width can be viewed or modified to a number that accommodates the data length (less than 32K).

From Windows: Data Dictionary -> select table -> Options -> SQL Properties -> Adjust Field Width
From UNIX: Data Dictionary -> Schema -> SQL Properties -> Adjust Field Width 

Since Progress 9.1E, DBTOOL can be used to report and adjust SQL Width with the Options:
1. SQL Width & Date Scan w/Report Option
2. SQL Width Scan w/Fix Option

The default SQL-92 width algorithm for data types supported by 4GL/ABL and their corresponding SQL-92 data types are as follows:

VARCHAR          = x2 CHARACTER
DATE             = DATE        
DECIMAL/NUMERIC  = 17 DECIMAL  
INTEGER          = INTEGER     
BIGINT           = INT64       
BIT              = LOGICAL     
VARBINARY        = x2 RAW      
INTEGER          = RECID       
TIMESTAMP        = DATE-TIME
  

 
If the data is larger than the SQL Width, error code 210012 or native -210012 and "Column in table" has value exceeding its max length or precision (7864) will result.

The default for SQL-92 VARCHAR is twice 4GL CHARACTER and the SQL-92 width of the field may be longer than that required.  This will result in:
MM- Row too big (7711)
from a SELECT() which is due to the limit in the SQL-92 engine.

DECIMAL and NUMERIC are defined in terms of:
+ 'precision': number of digits  (max = 50) and
+ 'scale': number of digits to the right of the decimal (max = 10)
Scale cannot be greater than precision.

DATE, INTEGER, LOGICAL and RECID are not applied because by their nature, they are equal to that defined.
Workaround
Notes
References to Other Documentation:

Database Administration Guide and Reference - "Progress Database Limits" Table 3-9 "SQL-92 data types and value limits"
Keyword Phrase
Last Modified Date2/17/2021 9:17 PM

Powered by