Subject | Re: [ib-support] how to perform update with aggregate subselect ? |
---|---|
Author | Andrew Guts |
Post date | 2002-06-19T14:04:04Z |
My solution is:
delete from table1;
insert into table1 (CustomerID, ..., Total)
select t2.CustomerID, ..., sum(t2.Quantity) from table2 t2
where ...
group by t2.CustomerID, ...;
It works as expected.
Thanks all.
Andrew
delete from table1;
insert into table1 (CustomerID, ..., Total)
select t2.CustomerID, ..., sum(t2.Quantity) from table2 t2
where ...
group by t2.CustomerID, ...;
It works as expected.
Thanks all.
Andrew