Hi,
I have an error:
unexpected token: CLUSTERED required: (
while creating a table in mdb. below is the query i used, Please help me in resolving the error
String sqlOutMdb = "create table WOE_CUST_ORD_HEAD (" + " MMM_ORG_CODE CHAR (3) not null," + " CO_ID CHAR (2) not null," + " SLS_DEPT_ID CHAR(3) not null," + " SLS_TERR_CODE CHAR(6) not null," + " CUST_ORD_ANNO CHAR(4) not null," + " PREFISSO CHAR(1) not null," + " SLMN_REF_NBR INTEGER not null," + " CUST_ID CHAR(8) not null," + " CUST_ORD_DATE DATETIME not null," + " CUST_ORD_REF_NBR CHAR(24) not null," + " RQST_DEL_DATE DATETIME," + " CUST_INVC_TO_LOC_ID CHAR(8) not null," + " CUST_STO_LOC_ID CHAR(8) not null," + " SVC_RESP_GRP_CODE CHAR(8) not null," + " ITEM_DEL_TYPE_CODE CHAR(3) not null," + " CONCTACT_NAME CHAR(35) not null," + " PHONE_AREA_CODE CHAR(6) not null," + " PHONE_NBR CHAR(11) not null," + " ORD_INST_CODE CHAR(4) not null," + " ORD_INST_TEXT MEMO not null," + " ORD_DATE_SEND DATETIME not null," + " ORD_STATUS CHAR (1) not null," + " PYMT_METH_CODE CHAR(2) not null," + " PYMT_TERM_CODE CHAR(2) not null," + " ORDER_ID CHAR(20) not null," + " NET_VALORE decimal(13, 4) NOT NULL," + " MANL_NET_VALORE decimal(13, 4) NOT NULL," + " SAVE_DATE char (8) NOT NULL," + " SAVE_TIME char (6) NOT NULL," + " ORD_NOTE_CODE CHAR(4) not null," + " ORD_NOTE_TEXT MEMO not null," + " CONSTRAINT [PK_WOE_CUST_ORD_HEAD] PRIMARY KEY CLUSTERED" + " (" + " [MMM_ORG_CODE] ," + " [CO_ID] ," + " [SLS_DEPT_ID] ," + " [SLS_TERR_CODE] ," + " [CUST_ORD_ANNO] ," + " [PREFISSO] ," + " [SLMN_REF_NBR] " + ")" + ")";
output i get is an error:
Note: i am using the latest verision of UcanAccess jars
nice, delete the word "CLUSTERED" and it will work(CLUSTERED isn't supported neither by access nor ucanaccess).
Great job Marco, it worked !! many thanks for your help
Log in to post a comment.
Hi,
I have an error:
unexpected token: CLUSTERED required: (
while creating a table in mdb. below is the query i used, Please help me in resolving the error
String sqlOutMdb =
"create table WOE_CUST_ORD_HEAD (" +
" MMM_ORG_CODE CHAR (3) not null," +
" CO_ID CHAR (2) not null," +
" SLS_DEPT_ID CHAR(3) not null," +
" SLS_TERR_CODE CHAR(6) not null," +
" CUST_ORD_ANNO CHAR(4) not null," +
" PREFISSO CHAR(1) not null," +
" SLMN_REF_NBR INTEGER not null," +
" CUST_ID CHAR(8) not null," +
" CUST_ORD_DATE DATETIME not null," +
" CUST_ORD_REF_NBR CHAR(24) not null," +
" RQST_DEL_DATE DATETIME," +
" CUST_INVC_TO_LOC_ID CHAR(8) not null," +
" CUST_STO_LOC_ID CHAR(8) not null," +
" SVC_RESP_GRP_CODE CHAR(8) not null," +
" ITEM_DEL_TYPE_CODE CHAR(3) not null," +
" CONCTACT_NAME CHAR(35) not null," +
" PHONE_AREA_CODE CHAR(6) not null," +
" PHONE_NBR CHAR(11) not null," +
" ORD_INST_CODE CHAR(4) not null," +
" ORD_INST_TEXT MEMO not null," +
" ORD_DATE_SEND DATETIME not null," +
" ORD_STATUS CHAR (1) not null," +
" PYMT_METH_CODE CHAR(2) not null," +
" PYMT_TERM_CODE CHAR(2) not null," +
" ORDER_ID CHAR(20) not null," +
" NET_VALORE decimal(13, 4) NOT NULL," +
" MANL_NET_VALORE decimal(13, 4) NOT NULL," +
" SAVE_DATE char (8) NOT NULL," +
" SAVE_TIME char (6) NOT NULL," +
" ORD_NOTE_CODE CHAR(4) not null," +
" ORD_NOTE_TEXT MEMO not null," +
" CONSTRAINT [PK_WOE_CUST_ORD_HEAD] PRIMARY KEY CLUSTERED" +
" (" +
" [MMM_ORG_CODE] ," +
" [CO_ID] ," +
" [SLS_DEPT_ID] ," +
" [SLS_TERR_CODE] ," +
" [CUST_ORD_ANNO] ," +
" [PREFISSO] ," +
" [SLMN_REF_NBR] " +
")" +
")";
output i get is an error:
unexpected token: CLUSTERED required: (
Note: i am using the latest verision of UcanAccess jars
Last edit: aditya 2015-07-21
nice, delete the word "CLUSTERED" and it will work(CLUSTERED isn't supported neither by access nor ucanaccess).
Last edit: Marco Amadei 2015-07-21
Great job Marco, it worked !! many thanks for your help