• 查找指定流程的料号


    
    
    类型1、正常的图形电镀板流程是:整板镀铜——碱蚀曝光——碱蚀显影——图形电镀;
    类型2、整板镀锡的板子流程是:整板镀铜——图形电镀;
    
    类型1、ME14NU8552A0
    类型2、ME22N20FHEA1
    
    
    
    --所有过数站点的MI流程信息
    select
    DISTINCT D50.CUSTOMER_PART_NUMBER,D38.STEP_NUMBER,D34.DEPT_CODE,D34.DEPT_NAME,D34.RKEY INTO #ALL --DROP TABLE #ALL --select * from #ALL from DATA0038 D38 INNER JOIN DATA0050 D50 ON D50.RKEY=D38.SOURCE_PTR AND D38.TTYPE=4 INNER join DATA0034 D34 ON D34.RKEY=D38.DEPT_PTR AND D34.TTYPE=1 AND D34.BARCODE_ENTRY_FLAG='Y' group by D50.CUSTOMER_PART_NUMBER,D38.STEP_NUMBER,D34.DEPT_CODE,D34.DEPT_NAME,D34.RKEY order by D50.CUSTOMER_PART_NUMBER,D38.STEP_NUMBER
    --筛选行 整板镀铜  28 
      
      select  DISTINCT CUSTOMER_PART_NUMBER
      INTO #CUST_28    --整板镀铜
      from #ALL
      where 
      1=1
      AND RKEY=28 
      order by CUSTOMER_PART_NUMBER
    --筛选行 图形镀铜 183
      
      select  DISTINCT CUSTOMER_PART_NUMBER
      INTO #CUST_183   --图形镀铜 
      from #ALL
      where 
      1=1
      AND RKEY=183 
      order by CUSTOMER_PART_NUMBER
    --筛选有序的数据行
      SELECT ROW_NUMBER() OVER(PARTITION BY CUSTOMER_PART_NUMBER  ORDER BY CUSTOMER_PART_NUMBER) ID,* 
      INTO #分组有序号的筛选
      from #ALL
      where 
      1=1
      AND #ALL.CUSTOMER_PART_NUMBER IN (SELECT CUSTOMER_PART_NUMBER FROM #CUST_28)
      AND #ALL.CUSTOMER_PART_NUMBER IN (SELECT CUSTOMER_PART_NUMBER FROM #CUST_183)
      order by CUSTOMER_PART_NUMBER
      SELECT * INTO #T1 FROM #分组有序号的筛选 WHERE RKEY IN (28,183)
    --自查询得出结果集
      select #T1.CUSTOMER_PART_NUMBER  INTO #RESULT from #T1 
     INNER join #T1 T2 on T2.CUSTOMER_PART_NUMBER=#T1.CUSTOMER_PART_NUMBER AND T2.ID=#T1.ID+1
    --验证所有料号都是28->183
      SELECT * FROM #RESULT WHERE CUSTOMER_PART_NUMBER LIKE '%ME22N20FHEA1%'
      select * from #分组有序号的筛选  WHERE CUSTOMER_PART_NUMBER LIKE '%ME22N20FHEA1%'
  • 相关阅读:
    微服务网关常用限流算法
    微服务网关zuul介绍
    Nginx实现微服务网关的简单介绍
    11.9-编写操作者
    11.5-编写程序
    11.3-学习操作者文档
    11.2-LV面向对象编程视频学习及周五与老师交流总结
    10.29-基于LabVIEW的分布式集群机器人控制系统
    10.27-运用操作者框架架设控制中心软件架构
    5.24-29离线解析问题
  • 原文地址:https://www.cnblogs.com/ailanglang/p/6728747.html
Copyright © 2020-2023  润新知