SQL Server數(shù)據(jù)庫

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."隱患里程"
);
以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號