12
返回列表 发新帖
楼主: hailen

Inv其间关不了了

[复制链接]
论坛徽章:
4
授权会员
日期:2006-09-06 10:51:352009日食纪念
日期:2009-07-22 09:30:002011新春纪念徽章
日期:2011-02-18 11:43:352013年新春福章
日期:2013-02-25 14:51:24
11#
发表于 2006-11-16 10:22 | 只看该作者

收藏……

……

使用道具 举报

回复
论坛徽章:
13
生肖徽章2007版:蛇
日期:2008-04-07 19:50:192011新春纪念徽章
日期:2011-02-18 11:43:33ITPUB9周年纪念徽章
日期:2010-10-08 09:28:51生肖徽章2007版:羊
日期:2009-09-14 11:24:242009日食纪念
日期:2009-07-22 09:30:00授权会员
日期:2008-10-18 08:26:05生肖徽章2007版:鸡
日期:2008-10-11 11:00:40生肖徽章2007版:马
日期:2008-09-18 09:45:46奥运会纪念徽章:铁人三项
日期:2008-08-01 14:31:54数据库板块每日发贴之星
日期:2008-06-14 01:02:01
12#
发表于 2009-9-1 13:49 | 只看该作者
混混行啊~3年前就給我把問題解決啦~

使用道具 举报

回复
论坛徽章:
10
2010年世界杯参赛球队:德国
日期:2010-05-26 09:49:34
13#
发表于 2009-9-1 16:20 | 只看该作者

回复 #9 hailen 的帖子

没什么好问的了.
只能让DBA去查一下,你的COST MANAGER有没有异常停过.

使用道具 举报

回复
论坛徽章:
15
NBA常规赛纪念章
日期:2013-04-22 11:49:35NBA季后赛纪念徽章
日期:2013-06-21 14:52:05ITPUB社区12周年站庆徽章
日期:2013-10-08 14:54:39马上加薪
日期:2014-10-23 16:03:28马上有对象
日期:2014-12-22 11:23:38知识
日期:2015-08-11 10:22:26知识
日期:2015-08-11 10:34:17秀才
日期:2015-09-21 09:46:16
14#
发表于 2009-9-1 23:02 | 只看该作者
原帖由 robincao 于 2006-11-15 09:46 发表
--1.select cost error
select
m.transaction_id ,
m.transfer_organization_id,
m.organization_id,
msib.segment1 item,
mtt.transaction_type_name,
to_char(m.transaction_date,'yyyy-mm-dd') 事务日期,
m.transaction_reference,
m.transaction_id ,
m.subinventory_code,
m.costed_flag,
m.cost_group_id,
m.cost_category_id,
m.cost_update_id,
m.error_code,
m.error_explanation,
m.transaction_group_id
--m.transaction_type_id,
--m.transaction_source_name,
--m.*
from
MTL_MATERIAL_TRANSACTIONS M,
MTL_TRANSACTION_TYPES MTT,
mtl_system_items_b msib
where
   
to_char(m.transaction_date,'yyyymm')='200609'
and m.costed_flag='E'
--and m.error_code='No Error in CSTPSISC.ins_std_cost.'
--and m.subinventory_code='201_RMH'
and M.TRANSACTION_TYPE_ID = MTT.TRANSACTION_TYPE_ID
and msib.inventory_item_id=m.inventory_item_id
and msib.organization_id=m.organization_id
--and m.transfer_organization_id is null
--and m.transaction_id='10928181'
order by
mtt.transaction_type_name,
to_char(m.transaction_date,'yyyy-mm-dd'),
m.subinventory_code


--2.select cost no
--no
select
m.transaction_id
,
m.transfer_organization_id,
m.organization_id,
msib.segment1 item,
mtt.transaction_type_name,
to_char(m.transaction_date,'yyyy-mm-dd') 事务日期,
m.transaction_reference,
m.transaction_id ,
m.subinventory_code,
m.costed_flag,
m.cost_group_id,
m.cost_category_id,
m.cost_update_id,
m.error_code,
m.error_explanation,
m.transaction_group_id
--m.transaction_type_id,
--m.transaction_source_name,
--m.*

from
MTL_MATERIAL_TRANSACTIONS M,
MTL_TRANSACTION_TYPES MTT,
mtl_system_items_b msib
where
   to_char(m.transaction_date,'yyyymm')='200609'
and m.costed_flag='N'
--and m.error_code='No Error in CSTPSISC.ins_std_cost.'
--and m.subinventory_code='201_RMH'
and M.TRANSACTION_TYPE_ID = MTT.TRANSACTION_TYPE_ID
and msib.inventory_item_id=m.inventory_item_id
and msib.organization_id=m.organization_id
--and m.transfer_organization_id is null
--and m.transaction_id='10928181'
order by
mtt.transaction_type_name,
to_char(m.transaction_date,'yyyy-mm-dd'),
m.subinventory_code


--3.
update  MTL_MATERIAL_TRANSACTIONS M1
  set m1.costed_flag = 'N',
m1.error_code = NULL,
m1.error_explanation = NULL,
m1.transaction_group_id = NULL
where
--m.transaction_id='10926766'
m1.transaction_id in
(
select
m.transaction_id
from
MTL_MATERIAL_TRANSACTIONS M,
MTL_TRANSACTION_TYPES MTT,
mtl_system_items_b msib
where
    to_char(m.transaction_date,'yyyymm')='200607'
--and to_char(m.transaction_date,'yyyymmdd')

收藏学习了. ....

使用道具 举报

回复
论坛徽章:
74
蓝锆石
日期:2011-12-29 15:35:34萤石
日期:2011-11-18 15:00:15祖母绿
日期:2011-12-29 15:26:07海蓝宝石
日期:2011-12-30 16:00:25紫水晶
日期:2011-12-29 15:26:07红宝石
日期:2011-12-29 15:26:07季节之章:冬
日期:2012-01-01 12:35:07季节之章:冬
日期:2012-01-01 12:35:07季节之章:夏
日期:2011-09-28 16:06:59季节之章:夏
日期:2011-09-28 16:06:59
15#
发表于 2009-9-2 08:28 | 只看该作者
上面的sql太多了
其实只需要看MTL_MATERIAL_TRANSACTIONS这个表错误的行
找到错误后
update  MTL_MATERIAL_TRANSACTIONS M1
  set m1.costed_flag = 'N',
m1.error_code = NULL,
m1.error_explanation = NULL,
m1.transaction_group_id = NULL
where
--m.transaction_id='10926766' --对应行的id

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表