Hi
I am trying to update a table with data from another table but am having very big problems when actually executing it.
I have had to convert the sql from a previous owner from this
INSERT INTO [Survey Jobs] ( [Survey ID], [Survey Job Code], Incumbs, Weight2, Coys, AvgAge,
AvgServ ) SELECT DISTINCT [Survey ID], [Survey Job Code], Sum([No of Incumbents]),
Sum([No of Incumbents]), Sum([No of Matches]), Avg(AvgAge), Avg(AvgServ) FROM [Survey Data]
WHERE (DefinePayCode='TCASH')
GROUP BY [Survey ID], [Survey Job Code];
into an UPDATE query to do the same thing.
i think the group by is my biggest enemy at the minute
Help please
Nev
I am trying to update a table with data from another table but am having very big problems when actually executing it.
I have had to convert the sql from a previous owner from this
INSERT INTO [Survey Jobs] ( [Survey ID], [Survey Job Code], Incumbs, Weight2, Coys, AvgAge,
AvgServ ) SELECT DISTINCT [Survey ID], [Survey Job Code], Sum([No of Incumbents]),
Sum([No of Incumbents]), Sum([No of Matches]), Avg(AvgAge), Avg(AvgServ) FROM [Survey Data]
WHERE (DefinePayCode='TCASH')
GROUP BY [Survey ID], [Survey Job Code];
into an UPDATE query to do the same thing.
i think the group by is my biggest enemy at the minute
Help please
Nev