zoukankan      html  css  js  c++  java
  • 自己写的第一个视图(为了纪念)

    自己写的第一个视图:

    CREATE VIEW [dbo].[view_Returndate]

    AS

    SELECT     p.htid + ',' + p.inspectingitemAssignment AS htidassign, p.htid AS htid, c.classificationname AS classificationname, item.projectnumber AS result,

                          p.phone AS sampleid, p.times AS statu, p.client AS conversion, p.sampledate AS finishtime, item.projectnumber AS projectnumber,c.classification as classification

    FROM         inspectingitem AS item, childinspecting AS c, inspectionpact AS p

    WHERE     item.projectnumber IN

                              (SELECT     *

                                FROM          dbo.f_splitstr(cast(p.inspectingitem AS varchar(1024)), ',')) AND item.projectnumber = c.projectnumber AND

                        (p.htid + '' + item.projectnumber+''+c.classification NOT IN

                              (SELECT     r.htid + '' + r.inspectingitem +''+r.classification AS a

                                FROM          returndate AS r))

    UNION

    SELECT     r.htid + ',' + item.projectnumber AS htidassign, r.htid, c.classificationname AS classificationname, r.result AS result, r.sampleid AS sampleid,

                          r.statu AS statu, r.conversion AS conversion, r.finishtime AS finishtime, r.inspectingitem AS projectnumber,c.classification as classification

    FROM         returndate r LEFT JOIN

                          inspectingitem item ON r.inspectingitem = item.projectnumber LEFT JOIN

                          childinspecting c ON r.inspectingitem = c.projectnumber and r.classification=c.classification

     

     

    // dbo.f_splitstr这个是自己写的处理字符串的函数

  • 相关阅读:
    Nginx配置文件详解
    ngrinder 负载均衡脚本开发
    spring boot过滤器FilterRegistrationBean
    Spring boot 拦截器和过滤器
    spring controller中默认转发、forward转发、redirect转发之间的区别
    @RestControllerAdvice作用及原理
    Android APK脱壳--腾讯乐固、360加固一键脱壳
    java 简单xor加密
    facebook 研究
    阿里云docker安装
  • 原文地址:https://www.cnblogs.com/wangliansong/p/3517569.html
Copyright © 2011-2022 走看看