Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sp_Update help please

Status
Not open for further replies.

NevG

Programmer
Joined
Oct 10, 2000
Messages
162
Location
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top