0

I executed this sql script

create table NIEKI_OBO_RESULT_LOG (
  DELETE_FLAG CHAR(1) default '0' not null
  , REG_DATE TIMESTAMP(3) not null
  , REG_UID CHAR(7) not null
  , MOD_DATE TIMESTAMP(3) not null
  , MOD_UID CHAR(7) not null
  , NIEKI_OBO_RESULT_LOG_KEY CHAR(15) not null
  , DC_CODE CHAR(2)
  , MU_CODE CHAR(3) not null
  , WH_CODE CHAR(3)
  , WH_TO_CODE CHAR(3)
  , DENPYO_TYPE_CODE CHAR(2)
  , BRH_CODE CHAR(3) not null
  , CUST_CODE CHAR(6) not null
  , DISPATCH_CODE NCHAR(8) not null
  , MAGUCHI_CODE CHAR(5)
  , DISPATCH_NAME NVARCHAR2(20)
  , FOREIGN_FLAG CHAR(1) default '0' not null
  , FOREIGN_MAGUCHI_CODE CHAR(5)
  , ALLOC_CARS_CODE CHAR(12)
  , NOTEN_NO CHAR(10) not null
  , ONRAIL_NO CHAR(10)
  , SO_NO CHAR(10)
  , SSO_NO NCHAR(10)
  , DUE_DATE TIMESTAMP(3)
  , ORIGINAL_DATE TIMESTAMP(3)
  , ITEM_NAME CHAR(27) not null
  , OBO_RESULT_QTY NUMBER(9, 0) default 0 not null
  , ELEVEN_SUPPLIED_QTY NUMBER(9, 0) default 0 not null
  , NZ_SUPPLIED_QTY NUMBER(9, 0) default 0 not null
  , OBO_TOTAL_QTY NUMBER(9, 0) default 0 not null
  , REV_CARRY_QTY NUMBER(9, 0) default 999999999 not null
  , REV_CARTON_QTY NUMBER(9, 0) default 0 not null
  , REV_PIECE_QTY NUMBER(9, 0) default 0 not null
  , REV_PIECE_CARTON_QTY NUMBER(3, 0) default 0 not null
  , REV_PACK_UNIT_CODE CHAR(2)
  , REV_CARTON_TYPE_CODE CHAR(3)
  , CARTON_PRICE NUMBER(17, 5) default 0 not null
  , CARTON_RATE NUMBER(17, 9) default 0 not null
  , PACK_UNIT_CODE CHAR(2)
  , CLOSING_DATE TIMESTAMP(3)
  , CONFIRM_DATE TIMESTAMP(3)
  , NIEKI_PRICE NUMBER(17, 5) default 0 not null
  , PROCESS_SIGN CHAR(1)
  , RELAY_SIGN CHAR(1) default ' ' not null
  , OBO_KEY CHAR(15)
  , OBO_QTY NUMBER(9, 0) default 0 not null
  , OBO_LOT_BASE_DATE TIMESTAMP(3)
  , OBO_LOT_BAT_FLAG CHAR(1) default '0' not null
  , ORDER_STATUS_SIGN CHAR(1)
  , SUSPEND_FLAG CHAR(1) default '0' not null
  , PC_CODE CHAR(5)
  , GROUP_NO CHAR(7)
  , CC_CODE CHAR(4)
  , CARTON_TYPE_CODE CHAR(3)
  , SALES_PRICE NUMBER(17, 5) default 0 not null
  , ORIGINAL_BRH_CODE CHAR(3) not null
  , ORIGINAL_CUST_CODE CHAR(6) not null
  , ORIGINAL_DISPATCH_CODE NCHAR(8) not null
  , CUST_PART_NAME NCHAR(20)
  , CARRY_QTY NUMBER(9, 0) default 999999999 not null
  , ITEM_WEIGHT NUMBER(21, 7) default 0 not null
  , AIR_SIGN CHAR(1)
  , FOREIGN_SHIJI_NO CHAR(10)
  , YOSANMOTO_CODE CHAR(4)
  , CUST_NAME NVARCHAR2(50)
  , CARTON_QTY NUMBER(9, 0) default '0' not null
  , PIECE_CARTON_QTY NUMBER(3, 0) default '0' not null
  , PIECE_QTY NUMBER(9, 0) default '0' not null
  , INCOMING_DATE TIMESTAMP(3) not null
  , PROD_MU_CODE CHAR(3)
  , SUP_NAME NCHAR(50)
  , MINUS_FLAG CHAR(1) default '0' not null
  , FOREIGN_SECTION_CODE CHAR(2)
  , AFTER_PROCESS_FLAG CHAR(1) default '0' not null
  , SUP_CODE CHAR(5)
  , constraint NIEKI_OBO_RESULT_LOGPX primary key (NIEKI_OBO_RESULT_LOG_KEY)
);

create index NIEKI_OBO_RESULT_LOG_IX1
  on NIEKI_OBO_RESULT_LOG(DC_CODE,WH_CODE,ORDER_STATUS_SIGN,"SYS_NC00076$",MAGUCHI_CODE);

create index NIEKI_OBO_RESULT_LOG_IX2
  on NIEKI_OBO_RESULT_LOG(NOTEN_NO);

But an error occured:

Error starting at line : 80 in command -
create index NIEKI_OBO_RESULT_LOG_IX1
  on NIEKI_OBO_RESULT_LOG(DC_CODE,WH_CODE,ORDER_STATUS_SIGN,"SYS_NC00076$",MAGUCHI_CODE)
Error report -
ORA-00904: "SYS_NC00076$": invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:
6
  • 3
    What's unclear about the error? Your table does not contain a column named "SYS_NC00076$" so obviously you can't create an index on that Commented Feb 7, 2019 at 8:02
  • Yeah i know that, this is just a DDL sent from client and i dont know what does SYS_NC00076$ means Commented Feb 7, 2019 at 8:10
  • That looks like an Oracle-named constraint (such as when you create a NOT NULL column; it is enforced, it doesn't have a custom-made name, but Oracle has to name it somehow, and that's how it looks like). Commented Feb 7, 2019 at 8:19
  • I see, so how to correctly execute this type of script? Commented Feb 7, 2019 at 8:21
  • Remove the non-existing column from your CREATE INDEX statement. Commented Feb 7, 2019 at 8:38

1 Answer 1

1

According to your create table command your table does not contains field with name "SYS_NC00076$". So either add this field to table or remove it from create index

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.