Kbase P24546: What is the reason for setting SQL-width?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  10/20/2004 |
|
Status: Verified
GOAL:
What is the reason for setting SQL-WIDTH?
GOAL:
What is upper limit for SQL-WIDTH?
FIX:
SQL-WIDTH is mainly designed for solving the incompatibility between 4GL and SQL92. 4GL Data is variable length, but SQL data is fixed length. The fact that SQL data has an upper limit is in accordance to the international SQL92 standard.
In order to access 4GL database through SQL92, SQL-width has to be used to define the SQL maximum length for 4GL fields. It normally applies to character, numeric and varbinary("raw" type in 4GL) types and can be modified through the 4GL "Data Dictionary" as the size of 4GL data increases.
The following are the upper limits on SQL-width for certain types:
4GL Type Max Value SQL-Width Calculation.
----------------- ---------------- --------------------------
character/raw 31995 2 * "4GL format"
decimal 50 (precision) 15 + "4GL decimals"