|
Posted by kalamos on 06/04/05 03:51
This is exactly the answer I was looking for, so simple yet so difficult to
find.
thanks for your help
:)
"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns966A612BFC362Yazorman@127.0.0.1...
> kalamos (kmcclare@hotmail.com) writes:
>> This statement fails
>> update ded_temp a
>> set a.balance = (select sum(b.ln_amt)
>> from ded_temp b
>> where a.cust_no = b.cust_no
>> and a.ded_type_cd = b.ded_type_cd
>> and a.chk_no = b.chk_no
>> group by cust_no, ded_type_cd, chk_no)
>
> update ded_temp
> set a.balance = (select sum(b.ln_amt)
> from ded_temp b
> where a.cust_no = b.cust_no
> and a.ded_type_cd = b.ded_type_cd
> and a.chk_no = b.chk_no
> group by cust_no, ded_type_cd, chk_no)
> from ded_temp a
>
> None of the syntaxes are in line with standard SQL, so different enginge
> have added different place where you can put in the alias.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
>
> Books Online for SQL Server SP3 at
> http://www.microsoft.com/sql/techinfo/productdoc/2000/books.asp
[Back to original message]
|