注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

欢迎光临我的博客

 
 
 

日志

 
 

ifs删除库存件脚本  

2008-11-15 12:02:39|  分类: 总结 |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

 

---------------------------------------------------------------------------------------

--delete_part.sql
-- Delete Unnecessary Part No for Inventory Component
-- Mark Ni
-- July 18, 2001
-- Version 1.1.0
-- update by caifeng 2006/8/1 add inventtory_part_unit_cost_tab, rounting table etc

Undefine Part_no_;
Undefine Contract_;
Accept Part_no_  char Prompt "Please enter needed to delete Part No:";
Accept Contract_  char Prompt "Please enter needed to delete Part No's Site No:";

#Spool c:\&Part_no_;
---------------------------------------------------------------------------------------
-- Show Delete Data
delete from INVENTORY_PART_BARCODE_TAB where part_no='&part_no_' and contract='&contract_';
delete from part_catalog_tab where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_CHAR_TAB where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_CONFIG_TAB where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_COST_FIFO_TAB where part_no='&part_no_' and contract='&contract_';
delete from inventory_part_unit_cost_tab where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_DEF_LOC_TAB where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_IN_STOCK_TAB  where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_LOC_PALLET_TAB where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_PALLET_TAB where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_PERIOD_HIST_TAB where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_PLANNING_TAB  where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_PART_TAB  where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_TRANSACTION_HIST_TAB where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_VALUE_PART_TAB  where part_no='&part_no_' and contract='&contract_';
delete from INVENTORY_VALUE_SIM_LINE_TAB where part_no='&part_no_' and contract='&contract_';
delete from MANUF_PART_ATTRIBUTE_TAB where part_no='&part_no_' and contract='&contract_';
delete from MANUF_STRUCTURE_HEAD_TAB where part_no='&part_no_' and contract='&contract_';
delete from MANUF_STRUCT_ALTERNATE_TAB where part_no='&part_no_' and contract='&contract_';
delete from routing_head_tab where part_no='&part_no_' and contract='&contract_';
delete from routing_alternate_tab where part_no='&part_no_' and contract='&contract_';
delete from PART_COST_PRICE_ELASTICITY_TAB where part_no='&part_no_' and contract='&contract_';
delete from PART_COST_TAB where part_no='&part_no_' and contract='&contract_';
delete from PART_REVISION_TAB where part_no='&part_no_' and contract='&contract_';
delete from STANDARD_COST_BUCKET_TAB where part_no='&part_no_' and contract='&contract_';
delete from STD_COST_BUCKET_ELEMENT_TAB where part_no='&part_no_' and contract='&contract_';
delete from CONFIG_PART_CATALOG_TAB  where part_no='&part_no_';
delete from sales_part_tab  where part_no='&part_no_' and contract='&contract_';
delete from purchase_part_tab  where part_no='&part_no_' and contract='&contract_';
Spool off
commit;
Undefine Part_no_;
Undefine Contract_;


 

  评论这张
 
阅读(394)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017