If the IF-ELSE loop is killing you,try to put the values of roc_stocking, lan_stocking in a GTT and then
1. If you are in 10g use merge to insert/delete stsc.temp_q_sku2.
2. If not in 10g loop thru GTT and insert using a decode in the where clause in the select statement.
However IMHO I see this adding to overhead.




Reply With Quote