oracle ORA-00936: missing expression 报错

时间:2021-08-17 22:31:28
INSERT INTO S_USR_MEMBER_TEMP
       (SESSION_ID
    ,USR_CD
     ,SEQ_NO
    ,MEMBER_KNAME
       ,MEMBER_KNAME2
       ,MEMBER_NAME
       ,MEMBER_NAME2
       ,MEMBER_ZIP
       ,MEMBER_ADR1
       ,MEMBER_ADR2
       ,MEMBER_ADR4
       ,MEMBER_ADR5
       ,MEMBER_TEL
       ,MEMBER_KEITAITEL
       ,MEMBER_YEAR
       ,MEMBER_MON
       ,MEMBER_DAY
       ,KINMUSAKI_KNAME
       ,KINMUSAKI_NAME
       ,KINMUSAKI_ZIP
       ,KINMUSAKI_ADR1
       ,KINMUSAKI_ADR2
       ,KINMUSAKI_ADR4
       ,KINMUSAKI_ADR5
    ,UPDATE_DATE)
 (
SELECT  '686321766'
      ,'00000000000000000048'
      ,(1+(row_number() over(order by S_USR_MEMBER.SEQ_NO))) rowno
      ,MEMBER_KNAME
      ,MEMBER_KNAME2
      ,MEMBER_NAME
      ,MEMBER_NAME2
      ,MEMBER_ZIP
      ,MEMBER_ADR1
      ,MEMBER_ADR2
      ,MEMBER_ADR4
      ,MEMBER_ADR5
      ,MEMBER_TEL
      ,MEMBER_KEITAITEL
      ,MEMBER_YEAR
      ,MEMBER_MON
      ,MEMBER_DAY
      ,KINMUSAKI_KNAME
      ,KINMUSAKI_NAME
      ,KINMUSAKI_ZIP
      ,KINMUSAKI_ADR1
      ,KINMUSAKI_ADR2
      ,KINMUSAKI_ADR4
      ,KINMUSAKI_ADR5
      ,20180903
  FROM S_USR_MEMBER 
 WHERE USR_CD = '00000000000000000048'
ORDER BY S_USR_MEMBER.SEQ_NO ) 

这个代码,是正确的代码,之前在select之前加了一个 values,结果一直报错

后来查了一下,只有两个待确定的写法:

insert的语法只有下面两种。
1、insert into 表(字段名1,字段名2......) values(值1,值2.....)
2、insert into 表1 select 字段 from 表2 where...