this has come up with many migration efforts.

will fix it shortly.

 

anoop

 

From: Liu, Ming (Ming) [mailto:[email protected]] 
Sent: Saturday, March 19, 2016 5:12 AM
To: [email protected]
Subject: 答复: DDL column DEFAULT question

 

Hi, Anoop,

 

I create JIRA 1901 

https://issues.apache.org/jira/browse/TRAFODION-1901?jql=project%20%3D%20TRAFODION

 

It will be a great help to let Trafodion support this kind of DDL syntax, in 
case an application need to migrate from other database which support this 
syntax into Trafodion.

Let me know if you think not agree.

 

Thanks,

Ming

 

发件人: anoop [mailto:[email protected]] 
发送时间: 2016年3月15日 0:05
收件人: [email protected] 
<mailto:[email protected]> 
主题: RE: DDL column DEFAULT question

 

default date not null... 

 

default comes before null clause. that

is ansi definition 

 

 

anoop

-------- Original message --------

From: "Liu, Ming (Ming)" <[email protected] <mailto:[email protected]> > 

Date: 3/14/2016 9:01 AM (GMT-08:00) 

To: [email protected] 
<mailto:[email protected]>  

Subject: DDL column DEFAULT question 

 

Hi, all,

 

I need to create a table in Trafodion with columns having DEFAULT, but I cannot 
make it work, any help will be very appreciated:

 

CREATE TABLE DBMARTA.ARPT_DIM_AUTORPT_PUB_MARK

(MARK_ID     SMALLINT        NOT NULL,

  BEGIN_TIME  DATE            NOT NULL  DEFAULT date'2008-01-01',

  END_TIME    DATE            NOT NULL  DEFAULT date'2018-01-01',

  ACTIVE_FLAG SMALLINT,

  MARK_NAME   VARCHAR(20),

  DESC_TXT    VARCHAR(80),

  primary key(MARK_ID, BEGIN_TIME, END_TIME)

);

*** ERROR[15001] A syntax error occurred at or before:

CREATE TABLE DBMARTA.ARPT_DIM_AUTORPT_PUB_MARK  (MARK_ID     SMALLINT        NO

T NULL,   BEGIN_TIME  DATE            NOT NULL  DEFAULT date'2008-01-01',   END

                                                      ^ (134 characters from 
start of SQL statement)

 

*** ERROR[8822] The statement was not prepared.

 

It seems NOT NULL and DEFAULT are conflicting? Or my syntax has some other 
issue? 

 

Thanks,

Ming

 

 

Reply via email to