我在 shell 脚本中运行它。我已将值作为参数传递:
sqlplus -S ${DW_DBUSER}@${DW_DB}/${DW_DBPASSWORD} <<EOF
INSERT INTO CS_CUSTOMERS_TEST(CUSTOMER_ID,COMPANY_CODE,CUSTOMER_NAME,SHIPTO_CONTACT_NAME,SHIPTO_ADDR,SHIPTO_CITY,SHIPTO_STATE,SHIPTO_ZIP,SHIPTO_PHONE,SHIPTO_FAX,EMAIL_ADDR,PROD_TRANSFER_CODE,TAPES_SHIPPED_CNT,IP_ADDRESS,LOGIN_ID,PASSWORD,DIRECTORY,PUBLIC_KEY,SINGLE_FILE_FLAG) VALUES('${CUSTOMER_ID}','${COMPANY_CODE}','${CUSTOMER_NAME}','${SHIPTO_CONTACT_NAME}','${SHIPTO_ADDR}','${SHIPTO_CITY}','${SHIPTO_STATE}','${SHIPTO_ZIP}','${SHIPTO_PHONE}','${SHIPTO_FAX}','${EMAIL_ADDR}','${PROD_TRANSFER_CODE}','${TAPES_SHIPPED_CNT}','${IP_ADDRESS}','${LOGIN_ID}','${PASSWORD}','${DIRECTORY}','${PUBLIC_KEY}','${SINGLE_FILE_FLAG}');
COMMIT;
EXIT;
EOF
但是每当我运行脚本时,它都会抛出一个错误:
insert_cs_customer.sh:第 64 行:插入:找不到命令
如果我的脚本有任何问题,请告诉我。我只有插入查询的问题