SQL Server数据库
2018-02-07 17:10 更新
CREATE TABLE "KK" AS SELECT
*
FROM
(
SELECT
"路线编码",
SUM (
CAST ("隐患里程" AS float4)
) AS "隐患"
FROM
"BP03-安保工程审核库"
GROUP BY
"路线编码"
) A,
(
SELECT
"路线编号",
CAST ("隐患里程" AS float4)
FROM
"BP03闫"
) B
WHERE
A ."路线编码" = B."路线编号"
AND (
A ."隐患" = B."隐患里程"
OR A ."隐患" <> B."隐患里程"
);
以上内容是否对您有帮助:
更多建议: