我正在尝试执行下一个查询:
SELECT
PROMO_PLAN.promo_plan_id,
PROMO_PLAN.promo_plan_name,
PROMO.promo_category_code,
PROMO.promo_id,
PROMO.allow_plan_code,
PROMO_PLAN.event_type_code,
( SELECT
NVL(PROMO_MAX_TIMING_DURATION_VW.duration, 900)
FROM
promo_max_timing_duration_vw
WHERE
PROMO_PLAN.promo_plan_id = PROMO_MAX_TIMING_DURATION_VW.promo_plan_id)
AS duration,
PROMO_PLAN.start_date,
PROMO_PLAN.end_date,
PROMO_PLAN.day_type_id
FROM
promo_plan,
promo
WHERE
PROMO_PLAN.promo_plan_id <> -1
AND PROMO_PLAN.promo_id = PROMO.promo_id
AND PROMO_PLAN.promo_plan_id = 18150
AND '27/09/2012' BETWEEN PROMO_PLAN.start_date AND PROMO_PLAN.end_date
AND (PROMO_PLAN.day_type_id = 1307001
OR PROMO_PLAN.day_type_id = -1)
AND (PROMO_PLAN.promo_target_id = -1
OR EXISTS (
SELECT
1
FROM
promo_plan_channel
WHERE
PROMO_PLAN_CHANNEL.promo_plan_id = PROMO_PLAN.promo_plan_id
AND PROMO_PLAN_CHANNEL.channel_id = 10829))
我收到错误消息:ORA-01427:单行子查询返回多于一行
我试图更改最后一个子查询,但它什么也没改变。
有人可以告诉我如何解决吗?
谢谢