• oracle ORA-00936: missing expression 报错


    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...

  • 相关阅读:
    P1247 取火柴游戏 (奇异局势)
    1290A
    P1236 算24点
    LCP 4. 覆盖
    leetcode 1066. 校园自行车分配 II
    hdu 2255 奔小康赚大钱
    NC200546 回文串
    上市是什么意思 为什么上市就有钱了
    主板、中小板、创业板、新三板的区别是什么?
    熔断机制
  • 原文地址:https://www.cnblogs.com/CuiHongYu/p/9582692.html
Copyright © 2020-2023  润新知