我似乎无法使该查询正常工作。它与我发现的每个示例匹配,但仍然存在错误:
v_select := 'SELECT count(*)
FROM customer_order
WHERE product_id = 197
AND subscr_tpye = ''Trial''
AND TRUNC(order_date) BETWEEN :1 AND :2';
EXECUTE IMMEDIATE v_select INTO v_trials USING y_rec.start_date, y_rec.end_date;
SP2-0552:未声明绑定变量“ 2”