摘要: DROP VIEW DMS.V_AQ_INSURANCECLAIMS;CREATE VIEW DMS.V_AQ_INSURANCECLAIMS ASSELECT * FROM (SELECT T1.FRAMENO AS 车架号,T1.LICENSENO AS 车牌号,T10.CARMODELNAME AS 车型,T7.CUSTOMERNAME AS 客户名称,T7.MOBILEPHONE AS 联系电话,T1.REPAIRNO AS 作业单号,--维修类型VARCHAR(T11.DELIVEREDDATE) AS 交车日期,T3.COMMONNAME AS 保险公司,VARCHAR(T1.FI 阅读全文
posted @ 2013-12-19 20:22 沙耶 阅读(1370) 评论(0) 推荐(0) 编辑
摘要: WITH B (FATHER,SON,ID,ALLINFO) AS (SELECT RTRIM(LTRIM(CHAR(A.ID)))|| CHAR(ROW_NUMBER() OVER(PARTITION BY ID)) AS FATHER, RTRIM(LTRIM(CHAR(A.ID)))|| CHAR(ROW_NUMBER() OVER(PARTITION BY ID) + 1) AS SON, A.ID, CAST(A.INFO AS VARCHAR(100)) FROM T_DETAIL A UNION ALL ... 阅读全文
posted @ 2013-12-19 19:21 沙耶 阅读(384) 评论(0) 推荐(0) 编辑