Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
issam
Starting Member
30 Posts |
Posted - 2007-08-24 : 04:30:14
|
| Hi,I have the following case:-File a(transaction File)__File b(summary File)___File c(summary)acctno___Value DB/CR_____Acctno DB,CR_______acctno DB,CR1___________100db___________1______________________11___________300cr___________2______________________21___________600db2___________700dbI want to update the account on table b and c from table a.My current update is just for one table as follows:-UPDATE amasterSET cmdb = cmdb + (SELECT SUM(transact.damt) AS Expr1 FROM transact WHERE (acctno = amaster.acctno) GROUP BY acctno), cmcr = cmcr + (SELECT SUM(transact.camt) AS Expr1 FROM transact WHERE (acctno = amaster.acctno) GROUP BY acctno)FROM amaster INNER JOIN transact ON transact.acctno = amaster.acctnothanks |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-24 : 06:02:39
|
You can't UPDATE two tables in one statement. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|