2017-06-10 33 views
0

蜂巢版本:1.1.0蜂房,cdh5.7.1錯誤而編譯聲明:失敗:ParseException的線1:49無法識別近輸入聲明「(」「stock_status_id」「」

當執行INSERT INTO聲明中,我提示以下錯誤:

錯誤在編譯時聲明:失敗:ParseException的線1:49 無法識別輸入附近 '(' 'stock_status_id' '' 在聲明中

INSERT INTO table tgt_ebr_stores_physical_counts (stock_status_id,stk_no,description,avg_unit_cost,phy_cnt_date,issue_date,rcpt_date,adj_date,review_date,on_reqst_only_flag,row_bin,primary_flag,new_qty,cap_qty,user_code,description_1) SELECT EIM_STOCK.STOCK_STATUS_ID,EIM_STOCK.STK_NO,EIM_STOCK.DESCRIPTION,EIM_STOCK_COSTS.AVG_UNIT_COST,EIM_STOCK_HISTORY.PHY_CNT_DATE,EIM_STOCK_HISTORY.ISSUE_DATE,EIM_STOCK_HISTORY.RCPT_DATE,EIM_STOCK_HISTORY.ADJ_DATE,EIM_STOCK_HISTORY.REVIEW_DATE,EIM_STOCK_LOCATION.ON_REQST_ONLY_FLAG,EIM_STOCK_LOCATION_QUANTITIES.ROW_BIN,EIM_STOCK_LOCATION_QUANTITIES.PRIMARY_FLAG,EIM_STOCK_LOCATION_QUANTITIES.NEW_QTY,EIM_STOCK_LOCATION_QUANTITIES.CAP_QTY,TSW_CODES.USER_CODE,TSW_CODES.DESCRIPTION FROM AAA_ORCL_SLK_M003P.EIM_STOCK EIM_STOCK JOIN AAA_ORCL_SLK_M003P.EIM_STOCK_LOCATION EIM_STOCK_LOCATION ON EIM_STOCK.STK_NO=EIM_STOCK_LOCATION.STK_NO JOIN AAA_ORCL_SLK_M003P.TSW_CODES TSW_CODES ON EIM_STOCK.ISSUE_UOM_ID=TSW_CODES.CODE_ID JOIN AAA_ORCL_SLK_M003P.EIM_STOCK_LOCATION_QUANTITIES EIM_STOCK_LOCATION_QUANTITIES ON EIM_STOCK_LOCATION.STK_NO=EIM_STOCK_LOCATION_QUANTITIES.STK_NO AND EIM_STOCK_LOCATION.LOC_CODE=EIM_STOCK_LOCATION_QUANTITIES.LOC_CODE JOIN AAA_ORCL_SLK_M003P.EIM_STOCK_HISTORY EIM_STOCK_HISTORY ON EIM_STOCK_LOCATION_QUANTITIES.STK_NO=EIM_STOCK_HISTORY.STK_NO AND EIM_STOCK_LOCATION_QUANTITIES.LOC_CODE = EIM_STOCK_HISTORY.LOC_CODE JOIN AAA_ORCL_SLK_M003P.EIM_STOCK_COSTS EIM_STOCK_COSTS ON EIM_STOCK_HISTORY.LOC_CODE=EIM_STOCK_COSTS.LOC_CODE AND EIM_STOCK_HISTORY.STK_NO=EIM_STOCK_COSTS.STK_NO; 

有人可以幫忙嗎?

回答

0

「作爲蜂巢1.2.0的每個INSERT INTO T能夠採取象INSERT 列列表INTO T(Z,X,C)」。

LanguageManualDML-Synopsis.1

蜂巢1.1不支持列列表。

您應該按順序在目標表中插入所有列。

INSERT INTO table tgt_ebr_stores_physical_counts SELECT ...