-8
INSERT INTO Table2 ( [Acct Numb], SubInfo, [Asset Mkt Val], [Acct Asset MV]) 
Values (t1t2.[Acct Root] & "01", t1t2.SubInfo, t1t2.[SumOfAsset Mkt Val], (SELECT SUM(t1t3.[SumOfAsset Mkt Val]) 
FROM Table1Totals t1t3 
WHERE t1t3.[Acct Root]=t1t2.[Acct Root])) 
From Table1Totals t1t2 
WHERE t1t2.[Acct Suffix] in '*0[134789]' and t1t2.[SubInfo] not in ('01 PART OF SUB ACCT');

当我尝试执行此表达式时,我收到弹出消息:“在表达式末尾缺少分号(;),它指向“From”(第一个)。

任何建议。

4

1 回答 1

0

编辑

子查询的 WHERE 子句引用了仅存在于子查询之外的 t1t2

WHERE t1t3.[Acct Root]=t1t2.[Acct Root]

t1t2 不存在

于 2013-07-09T15:52:04.327 回答