select csdl.delivery_number, nvl((select av.name from supliers av where av.seg = '1000'),
(select vl.description from FND_FLEX vl where vl.SET_ID = '1013717' and vl.ENABLED = 'Y'and vl.MEANING ='10'))
destination from cux_delivery_list csdl 是这个意思吧
(select vl.description from FND_FLEX vl where vl.SET_ID = '1013717' and vl.ENABLED = 'Y'and vl.MEANING ='10'))
destination from cux_delivery_list csdl 是这个意思吧
(select vl.description from FND_FLEX vl where vl.SET_ID = '1013717' and vl.ENABLED = 'Y'and vl.MEANING ='10')
else
(select av.name from supliers av where av.seg = '1000')
end
destination from cux_delivery_list csdl
and not exists(select 1 from supliers av where av.seg = '1000')
A中不存在记录的时候执行B
select csdl.delivery_number, (select av.name from supliers av where av.seg = '1000')destination from cux_delivery_list csdl
where exists (select av.name from supliers av where av.seg = '1000')
union all
select csdl.delivery_number, (select vl.description from FND_FLEX vl where vl.SET_ID = '1013717' and vl.ENABLED = 'Y'and vl.MEANING ='10')destination from cux_delivery_list csdl
where not exists (select av.name from supliers av where av.seg = '1000')