首页 > 代码库 > DB2数据库用 With语句分隔字符

DB2数据库用 With语句分隔字符

SELECT T1.REPAIRNO,       T1.UNDERTAKER10,       T3.FULLNAME          AS RECEIVERNAME,       T1.WALKDISTANCE,       T1.STATUSCODEDATE10  AS RECEIVETIME,       t8.REPAIRTYPE,       T5.DELIVEREDDATE,       CASE             WHEN T2.REPAIRNO IS NULL THEN             ELSE        END                     ISINSURANCE,       T2.FIXEDDATE,       T4.FULLNAME          AS CLAIMSNNAME,       T2.TotalFeeFROM   RT_REPAIR T1       LEFT JOIN RT_INSURANCECLAIMS T2            ON  T1.REPAIRNO = T2.REPAIRNO            AND T1.FRAMENO = T2.FRAMENO       LEFT JOIN CM_STAFF T3            ON  T1.UNDERTAKER10 = T3.STAFFPKID       LEFT JOIN CM_STAFF T4            ON  T2.ClaimsID = T4.STAFFPKID       LEFT JOIN RT_REPAIRPROCESS T5            ON  T1.REPAIRNO = T5.REPAIRNO       LEFT JOIN RT_CUSTOMERWISH T6            ON  T1.REPAIRNO = T6.REPAIRNO       LEFT JOIN RT_WORKCONTENT T7            ON  T6.REPAIRNO = T7.REPAIRNO            AND T6.WISHID = T7.WISHID       LEFT JOIN RM_RepairType t8            ON  t7.RepairTypeCode = t8.repairtypecodeWHERE  T1.FRAMENO = LHGRB186982000004       AND STATUSCODE = 99ORDER BY       REPAIRNO                DESC   

 

DB2数据库用 With语句分隔字符