编译语句时出错:FAILED:ParseException第1:49行无法识别'(''stock_status_id'',''语句附近的输入

时间:2017-06-10 12:36:49

标签: hive hiveql

Hive版本:Hive 1.1.0-cdh5.7.1

执行insert into语句时,我收到以下错误

  

编译语句时出错:FAILED: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;

有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

  

“从Hive 1.2.0开始,每个INSERT INTO T都可以采用类似INSERT的列列表   INTO T(z,x,c1)。“

     

LanguageManualDML-Synopsis.1

Hive 1.1不支持列列表。

您应按顺序在目标表中插入所有列。

<div class="wrapper">

  <table>
    <tr>
      <td>Foo</td>
     </tr>
  </table>
  
  <table>
    <tr>
      <td>Foo</td>
     </tr>
     <tr>
      <td>Foo</td>
     </tr>
     <tr>
      <td>Foo</td>
     </tr>
  </table>
  
  <table>
    <tr>
      <td>Foo</td>
     </tr>
     <tr>
      <td>Foo</td>
     </tr>
  </table>

</div>