syntax error in update statement

RobTuby

Registered User.
Local time
Today, 03:18
Joined
Nov 24, 2014
Messages
25
I have 2 tables called MakeTable1 and DBO_TBL_Activity

Im trying to update MakeTable1 with the values from TBL_Activity when both activity.StartDate and maketable1.Dates match but also acticity.IDStaff and Maketable1.ID Match

Below is the SQL i have so far

Code:
UPDATE [MakeTable1].[Detailsa] SET [dbo_tbl_activity].[details]
WHERE [MakeTable1.Dates)=[dbo_tbl_activity].[StartDate] AND [MakeTable1].[id]=[dbo_tbl_activity].[idstaff]);

The error is :syntax error in update statement

any help would be great

Thanks

Rob
 
You are not setting [dbo_tbl_activity].[details] to anything.

Code:
UPDATE table SET field1 [COLOR="Red"][B]= 0[/B][/COLOR]
WHERE field1 = 1

I'm I right or what?
 
for details on SQL UPDATE statement see this.
 

Users who are viewing this thread

Back
Top Bottom