SQL column widths and data type compatibility
- Last Updated: January 17, 2024
- 1 minute read
- OpenEdge
- Version 12.8
- Documentation
An ABL database can contain fields, also referred to
as columns, of variable length. However, SQL CREATE TABLE statements
specify the maximum width of each column in a table. ABL programs have
the ability to insert data whose length exceeds the Data Dictionary
value of SQLWidth. SQL applications will not be
able to read a row if a column contains data greater than the SQLWidth value
defined in the Data Dictionary.
Two tools enable you to compensate for column width discrepancies:
- The -
checkwidthstartup parameter - The
DBToolutility
Working with data type compatibility
While all ABL data types are supported by SQL equivalents, the following table illustrates the ABL data types and the corresponding compatible OpenEdge SQL data type.
| ABL data type | OpenEdge SQL data type |
|---|---|
ARRAY
|
ARRAY, VARARRAY
|
BLOB
|
LVARBINARY, BLOB
|
CHARACTER
|
VARCHAR, CHAR
|
CLOB
|
CLOB, LVARCHAR
|
DATE
|
DATE
|
DATETIME
|
TIMESTAMP
|
DATETIME-TZ
|
TIMESTAMP WITH TIME ZONE
|
DECIMAL
|
DECIMAL or NUMERIC |
INTEGER
|
INTEGER
|
LOGICAL
|
BIT
|
RAW
|
VARBINARY
|
RECID
|
INTEGER
|
For information on ABL data types, see Develop ABL Applications. For more information on OpenEdge SQL data types, see OpenEdge SQL Reference.