diff --git a/route_sql/new_part.sql b/route_sql/new_part.sql index d5c4870..e0b5c75 100644 --- a/route_sql/new_part.sql +++ b/route_sql/new_part.sql @@ -640,12 +640,18 @@ SELECT ,b.billto_group ,b.ship_cust_descr ,b.shipto_group - ,b.majg_descr - ,b.ming_descr - ,b.majs_descr - ,b.mins_descr - ,b.mod_chan - ,b.mod_chansub + ,COALESCE(m.avmajg,p.awmajg)||COALESCE(' - '||BQDES,'') majg_descr + ,COALESCE(m.avming,p.awming)||COALESCE(' - '||BRDES,'') ming_descr + ,COALESCE(m.avmajs,p.awmajs)||COALESCE(' - '||SJ.BSDES1,'') majs_descr + ,COALESCE(m.avmins,p.awmins)||COALESCE(' - '||SI.BSDES1,'') mins_descr + ,CASE COALESCE(SEG.SEGM,'Other') + WHEN 'Retail' THEN L.RETAIL + ELSE b.CHAN + END mod_chan + ,CASE COALESCE(SEG.SEGM,'Other') + WHEN 'Retail' THEN L.RETAILSUB + ELSE '' + END mod_chansub ,b.quota_rep_descr ,b.director_descr ,b.value_loc