0

这是我的INSERT声明:

INSERT INTO customer_payment (payment_type_id, PAYMENT_METHOD, PAYMENT_STATUS, sql_sequence)
((SELECT emcpm.payment_method_type_id,
         epmt.description, ecba.mandate_status 
  FROM cust_pay_map emcpm, payment_method_type epmt, customer_bank_account ecba 
  WHERE emcpm.payment_method_type_id = ecba.payment_method_type_id), MY_SEQ.nextval);

我得到错误

ORA-00907: 缺少右括号

当我运行它时。请帮我纠正错误。

4

1 回答 1

0

在 select 语句中添加序列,如下所示:

    INSERT
INTO customer_payment
  (
    payment_type_id,
    PAYMENT_METHOD,
    PAYMENT_STATUS,
    sql_sequence
  )
SELECT emcpm.payment_method_type_id,
  epmt.description,
  ecba.mandate_status ,
  MY_SEQ.nextval
FROM cust_pay_map emcpm,
  payment_method_type epmt,
  customer_bank_account ecba
WHERE emcpm.payment_method_type_id = ecba.payment_method_type_id;
于 2016-05-23T11:16:37.690 回答