据推测,这一行:
INSERT INTO time_calendar_dim_2 VALUES (SEQ_Time_Dim_IDSTART.nextval,r_time.DAY_ID,r_time.DAY_TIME_SPAN,r_time.DAY_END_DATE,r_time.WEEK_DAY_FULL,r_time.WEEK_DAY_SHORT,r_time.DAY_NUM_OF_WEEK,r_time.DAY_NUM_OF_MONTH,r_time.DAY_NUM_OF_YEAR,r_time.MONTH_ID,r_time.MONTH_TIME_SPAN,r_time.MONTH_END_DATE,r_time.MONTH_SHORT_DESC,r_time.MONTH_LONG_DESC,r_time.MONTH_SHORT,r_time.MONTH_LONG,r_time.MONTH_NUM_OF_YEAR,r_time.QUARTER_ID,r_time.QUARTER_TIME_SPAN,r_time.QUARTER_END_DATE,r_time.QUARTER_NUM_OF_YEAR,r_time.HALF_NUM_OF_YEAR,r_time.YEAR_ID,r_time.YEAR_TIME_SPAN,r_time.YEAR_END_DATE);
失败是因为你提供的值多于你的 time_calendar_dim_2 列(如果没有time_calendar_dim_2的DDL语句,很难说 .
此外,您应始终在 INSERT 语句中显式枚举目标列,而不是
INSERT INTO time_calendar_dim_2
VALUES (SEQ_Time_Dim_IDSTART.nextval, ...)
使用
INSERT INTO time_calendar_dim_2 (idstart, ..)
VALUES (SEQ_Time_Dim_IDSTART.nextval, ...)
否则,如果添加或删除表中的列,或者(更糟糕的是)列排序不符合您的预期,您就会感到非常惊讶 .