sadier

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
设计:
  库存明细表中增加是否分公司入库的标记IsBranchIn,初始值为零。只有经过分公司入库才改变其值。
所涉及的表:tbl_stockdetail.通过sql语句:
1.根据仓库日期
select top 12 * from tbl_stockdetail where billtype = 2 and branchno = {0}
and stockdate = {} and stockbillid in
(select stockbillid form tbl_stock where department = {2} and billtype = 2)
stockbillid = {1}
2.
update tbl_stockdetail set IsBranchIn = 1
where pkid = {0} and billtype = 2 and branchno = {2}
posted on 2004-10-13 09:26  毛小华  阅读(501)  评论(0编辑  收藏  举报