on 2016 Jun 30 2:58 PM
Hi Experts,
We are in a process of DB2 to HANA CDS migration.
In one of the DB2 table we had used unique number generator but while converting the same table to HANA CDS how we can write in HANA CDS syntax.
DB2 DDL:
CREATE TABLE "DB2"."HEADER" (
"ID" DECIMAL(15,0) NOT NULL GENERATED ALWAYS AS IDENTITY (
START WITH +1
INCREMENT BY +1
MINVALUE +1
MAXVALUE +999999999999999
NO CYCLE
CACHE 20
NO ORDER ) ,
"SYSTEM_ID" VARCHAR(10) ,
"CRE_TME" TIMESTAMP ,
"MOD_TME" TIMESTAMP ,
"ERR_FLAG" CHAR(1) )
IN "DB2" ;
HANA CDS code:
ENTITY HEADER {
ID : Decimal(15,0) NOT NULL ;
SYSTEM_ID : String(10) ;
CRE_TME : UTCTimestamp ;
MOD_TME : UTCTimestamp ;
ERR_FLAG : String(1) ; }
How I can use sequencer for field ID at the table definition level in HANA CDS.
Regards
BJ
Request clarification before answering.
This feature is not yet support in HANA CDS. For a work around please use a sequence within the INSERT statements.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 17 | |
| 8 | |
| 8 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.