我想通過SQL Server中的存儲過程來檢索總行和所有值。我有下面的東西。但是,它提到它不包含在聚合函數或GROUP BY
子句中。感謝您的回覆。謝謝。SQL Server中存儲過程的問題
ALTER PROCEDURE abc.testing
@facility varchar(50),
@date datetime
AS
SELECT count(*), *
FROM ss_table
WHERE _start = @date
And fid IN (SELECT id
FROM ss_facilities
WHERE name = @facility)
感謝Jon的編輯。 – 2012-02-01 00:54:39