on 05-16-2023 3:33 PM
We are migrating from oracle DB to HANA db.
When se11 generate the table with char column, the default value when working with Oracle was ' ':
CREATE
COLUMN TABLE 'ZTABLE'
('MANDT' NVARCHAR (000003)
DEFAULT '000' NOT NULL,
'RELID' NVARCHAR (000002)
DEFAULT ' ' NOT NULL,
when generating the same table in HANA the create table statement is:
CREATE TABLE 'ZTEMPORARY_STORE'
('MANDT' VARCHAR2 (000009)
DEFAULT '000' NOT NULL,
'RELID' VARCHAR2 (000006)
DEFAULT '' NOT NULL,
Can we control the default values?
Best regards,
Yotam
yotamdan
Yes, you can control the default values in HANA DB table creation. You can specify the default value for a column in the CREATE TABLE statement itself. Here is an example:
<code>CREATE TABLE "ZTABLE"
(
"MANDT" NVARCHAR(000003) DEFAULT '000' NOT NULL,
"RELID" NVARCHAR(000002) DEFAULT ' ' NOT NULL,
"FIELD1" NVARCHAR(000010) DEFAULT '0' NOT NULL,
"FIELD2" NVARCHAR(000010) DEFAULT '0' NOT NULL,
PRIMARY KEY ("MANDT", "RELID")
);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can use SAP Advanced SQL Migration Tool which you can do complete orcale db... you can download and execute
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.