ulsterweavers
asked on
what is the correct syntax to change the follwing code to insert only new records using where not exists
Select M.Booked, Sum(M.Moved) as Qty,
(Select Sum(Booked) From Moves Where Moves.Booked <= M.Booked) as Res
From Moves as M
Group by M.booked
order by M.Booked
(Select Sum(Booked) From Moves Where Moves.Booked <= M.Booked) as Res
From Moves as M
Group by M.booked
order by M.Booked
ASKER
Booked is the key (which is the string of a date, when booked), for example, if it has allready aggregated a certain amount of records, only new ones that have been added need to be inserted.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
what is the database type?