SAP HANA character string types
CHAR/VARCHAR/TEXT
SQL type names can be converted to ASCII-7 or national
character types, with an FGLPROFILE entry.
Before Genero BDL version 4.00, when creating a table in a program using CHAR
,
VARCHAR
or TEXT
column types, these SQL types names were converted
to SAP HANA national character types (assuming that the application wants to store ISO-8859-? or
UTF-8 data).
There was no option to force VARCHAR/CLOB SQL types, when only pure English ASCII-7 data needs to
be stored.
Note: In fact, SAP HANA database tables could be directly created with the required native
SQL types, by using SAP HANA SQL command tools. This is about creating tables from Genero
programs.
SQL type in .4gl SQL | Native SQL type |
---|---|
CHAR(n) |
NVARCHAR(n) (SAP HANA has no CHAR!) |
VARCHAR(n) | NVARCHAR(n) |
TEXT | NCLOB |
Starting with version 4.00, you can control CHAR/VARCHAR/TEXT SQL type name
conversion with the dbi.database.dbname.ifxemul.nationalchars
FGLPROFILE entry.
For pure English applications, use
VARCHAR/CLOB
SQL columns in SAP HANA to store
ASCII-7 data. For ISO-8859-? or UTF-8 applications, use NVARCHAR/NCLOB
SQL
types.Important: The
dbi.database.dbname.ifxemul.nationalchars
FGLPROFILE entry is by
default false
and needs to be set to true
, if your application
uses ISO-8859-? or UTF-8 character sets.SQL type in .4gl SQL | Native SQL type whenifxemul.nationalchars=false (default) |
Native SQL type whenifxemul.nationalchars=true |
---|---|---|
CHAR(n) |
VARCHAR(n) (SAP HANA has no CHAR!) | NVARCHAR(n) |
VARCHAR(n) | VARCHAR(n) | NVARCHAR(n) |
TEXT | CLOB | NCLOB |
Note also that in version 4.00, the fgldbsch schema extraction tool does the following conversions from the
native SQL types to FGL types to produce .sch files:
Native SQL type | Conversion mode A | Conversion mode B |
---|---|---|
CHAR(n) |
CHAR(n) | CHAR(n) |
VARCHAR(n) | VARCHAR2(n) | VARCHAR2(n) (was CHAR(n) in prior versions) |
NCHAR | CHAR(n) | NCHAR(n) |
NVARCHAR(n) |
VARCHAR2(n) | NVARCHAR2(n) |
CLOB | TEXT | TEXT |
NCLOB | TEXT | TEXT |
For more details, see CHAR and VARCHAR data types, TEXT and BYTE (LOB) types and ifxemul FGLPROFILE settings.