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
Similar Posts:
- C++ Error: passing ” “as” ” discards qualifiers
- org.hibernate.QueryException: could not resolve property
- [Solved] Oracle :value too large for column “SCHEMA”.”TABLE”.”COLUMN” (actual: 519, maximum: 500)
- Error: not a group by expression [How to Solve]
- SQL Error: Table is specified twice, both as a target for ‘UPDATE’ and as a separate source for data
- Oracle error: not a group by expression [How to Solve]
- Error in modifying data element data type [How to Solve]
- [Modified] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:3.0.0
- BindingException: Mapper method ‘xxx.dao.StudentDao.insertStudent’ attempted to return null from a method with a primitive return type (int).
- [Solved] MYSQL Error: “ Every derived table must have its own alias”