Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Sequence in HANA CDS

$
0
0

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


Viewing all articles
Browse latest Browse all 6412

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>