ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 查找没有加工明细

查找没有加工明细

原创 Linux操作系统 作者:zaorv 时间:2019-07-09 19:09:06 0 删除 编辑


-- crter:建立者,part_no:部位号,matNo:物料编号,mat_nm:物料名称,,crtdt:建立日期 ,splNo:样品号
select top 99 * from Style_stru_SampleList
where splNo = '080828008' order by ypseq

select top 9 * FROM YP_SampleList
where splno='080828008'
--样品型号
select splNO,style_no,styleName,customer,lastNo,outsoleNo,creater,QTY FROM YP_SampleList
where splno='080828008'
--样品明细
select splNo,style_no,part_no,matno,mat_Nm,mprice,crtdt,crter,modifyer from Style_stru_SampleList
where splNo = '080828008'
--加工明细
select top 19 * from style_stru_samplelist_jg
where splno='080828008' and style_no='d80265d-3' and matno='JGL-BLL-0069-000104'
order by flowNo,seq

--样品明细表_更新建立者
--update Style_stru_SampleList set Style_stru_SampleList.crter= YP_SampleList.creater from yp_sampleList where Style_stru_SampleList.crter='管理员'


--样品明细
select splNo,style_no,part_no,matno,mat_Nm,mprice,crtdt,crter,modifyer from Style_stru_SampleList
where splNo = '080828008'
--加工明细
select top 19 * from style_stru_samplelist_jg
where splno='080828008' and style_no='d80265d-3' and matno='JGL-BLL-0069-000104'
order by flowNo,seq

select a.splno,a.style_no,part_no,matNo from style_stru_sampleList
where matno not in (select matno,count(matno) from style_stru_samplelist_jg group by matno )

select matno,flowno from style_stru_samplelist_jg
where splno='080828008' and style_no='d80265d-3' and matno='JGL-BLL-0069-000104'
group by matno , flowno

select matno,flowno from style_stru_samplelist
where splno='080828008' and style_no='d80265d-3' and matno='JGL-BLL-0069-000104'

select a.matno,a.flowno where style_stru_sampleList a where a.splno=b.splno
--样品单 没有加工明细 --2566
select c.*,style_part.part_nm from (select style_stru_samplelist.splno,style_stru_samplelist.style_no,style_stru_samplelist.matno,style_stru_samplelist.part_no,
style_stru_samplelist.flowno from style_stru_samplelist
where style_stru_samplelist.flowno not in
(select distinct flowno from style_stru_sampleList_jg /* Where style_stru_samplelist_jg.flowno=style_stru_samplelist.flowno */ )
and style_stru_samplelist.matno like 'JGL-%') c ,style_part where c.part_no=style_part.part_no
-- order by style_stru_samplelist.splno,style_stru_samplelist.style_no,style_stru_samplelist.matno
order by *c.splno,c.style_no,c.matno

--物料需求BOM表 没有加工明细
select c.*,style_part.part_nm from
(select /*style_stru.splno, */ style_stru.style_no ,style_stru.matno ,style_stru.part_no,
style_stru.flowno from style_stru
where flowno not in
(select distinct flowno from style_stru_jg )
and style_stru.matno like 'JGL-%') c ,style_part where c.part_no=style_part.part_no
order by c.style_no,c.matno


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/729024/viewspace-564846/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2018-09-12

  • 博文量
    192
  • 访问量
    145114