1
我已經傳遞了兩次參數(:PRODUCT_ID)。我怎麼能傳遞:PRODUCT_ID只有一次低於查詢如何傳遞以下SQL查詢的單個參數
select count(1)
from (
select count(1) album_fa_counter
from actual_configs ac
where ac.config_id = :PRODUCT_ID
and exists (
select 1
from config_participants cp
where CONTRIBUTOR_CATEGORY = 'Featured Artist'
and cp.gpid = ac.gpid
)
) a,
(
select count(1) matching_track_fa_counter
from actual_tracks at1,
actual_configs ac1
where at1.gpid = ac1.gpid
and ac1.config_id = :PRODUCT_ID
and exists (
select 1
from recording_participants rp,
config_participants cp
where cp.CONTRIBUTOR_CATEGORY = 'Featured Artist'
and cp.gpid = at1.gpid
and cp.participant_name = rp.participant_name
and rp.CONTRIBUTOR_CATEGORY = 'Featured Artist'
and rp.isrc = at1.isrc
)
) b
where a.album_fa_counter = 0
or b.matching_track_fa_counter > 0;
此查詢正在爲我工作..謝謝 – Madhava