我的子查詢提供了一個錯誤:Msg 102, Level 15, State 1, Line 17 Incorrect syntax near ')'.
SQL子查詢錯誤附近)
SELECT SalesArea, Branch, Volume
from
(select
br.SalesArea as SalesArea
,br.Branch as Branch
, sum(a.Volume) as Volume
FROM dbo.vDetail a with (nolock)
LEFT JOIN
dbo.vBranch AS br WITH (nolock)
ON a.Branch = br.Branch
group by a.Volume, br.SalesArea, br.Branch)
你可能需要給子查詢的別名。 )qry。 – 2012-07-20 08:54:42
謝謝!解決了它。 – Wilest 2012-07-20 08:56:04