ROSS: YEAR END: FILL IN order count

Created by Kathy Kale, Modified on Thu, 2 Jan at 11:39 AM by Kathy Kale

 ROSS:  YEAR END:  FILL IN order count


/*  run this and drop into new spreadsheet    THEN update customers that are not already scc_fillin_order_limit = 2    copy “Update… “ below  */


select Sales_Order_type as ord_typ,  scc_fillin_order_limit as fill_in, * from customers  where ( Sales_Order_type = 'FOREIG'   or  Sales_Order_type = 'STOCK'   ) and  scc_fillin_order_limit <> 2 and CUSTOMER_NUMBER < 'E'  and CUSTOMER_NUMBER < 'C'  order by scc_fillin_order_limit, Sales_Order_type, CUSTOMER_NUMBER


/* verify */

select Sales_Order_type as ord_typ,  scc_fillin_order_limit as fill_in, * from customers  order by scc_fillin_order_limit, Sales_Order_type, CUSTOMER_NUMBER




update customers set scc_fillin_order_limit = 2  where scc_fillin_order_limit <> 2 and CUSTOMER_NUMBER < 'E' and Sales_Order_type = 'FOREIG'


update customers set scc_fillin_order_limit = 2  where scc_fillin_order_limit <> 2 and CUSTOMER_NUMBER < 'E' and Sales_Order_type = 'STOCK'


update customers set scc_fillin_order_limit = 2  where scc_fillin_order_limit <> 2 and CUSTOMER_NUMBER < 'E' and Sales_Order_type = 'TRANS'



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article