Tag Archives: oracle ORA00936: missing expression

Oracle ORA-00936: missing expression [How to Solve]

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 )

This code is the correct code. A value was added before select, and an error was always reported

There are only two methods to be determined:

There are only two kinds of syntax for insert
1. Insert into table 1 (field name 1, field name 2,…) values
2. Insert into table 1 select field from table 2 where