SQLServer数据库中创建临时表

IF object_id('tempdb..#jimmy') is not NULL BEGIN
DROP TABLE #jimmy;
END
IF object_id('tempdb..#jimmy1') is not NULL BEGIN
DROP TABLE #jimmy1;
END SELECT
ROW_NUMBER() OVER(ORDER BY Expr1 DESC) as RowNumber,
E0127,
Expr1,
A0101,
A0177,
A01BN,
codeitemdesc,
C0104
INTO #jimmy
FROM t_teamleader_view
WHERE C0104 IS NOT NULL AND A0177 IS NOT NULL; SELECT *
INTO #jimmy1
FROM
(SELECT *FROM #jimmy
WHERE RowNumber IN
(SELECT max(RowNumber) as validid FROM #jimmy
GROUP BY A0177)) as tb1
上一篇:js数组方法


下一篇:org.apache.catalina.core.DefaultInstanceManager cannot be cast to org.apache.tomcat.InstanceManager