and sc.customer_name in (DECODE(shipto,'0',sc.customer_name,shipto)); The trouble is that shipto contains a comma delimted list. I think that oracle is expanding it so that it works out to be like ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results