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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Missing Operator Error in Update Statement 1

Status
Not open for further replies.

kshanes

Programmer
Jan 9, 2002
21
0
0
US
Good morning,

I'm trying to update a column in 1 table based on information in 2 other tables. No matter how I format the SQL I keep getting the error: "Syntax Error (Missing Operator) in Query Expression 'UsersAndGroups.ACL FROM ConsolidateGroups'. The actual statement is below. Any help would be appreciated.
------------------------------------------------
Update ConsolidateGroups
SET ConsolidateGroups.ACL= UsersAndGroups.ACL
FROM ConsolidateGroups,
UsersAndGroups,
UserCounts
WHERE UserCounts.TotalACLs = 1
and UsersAndGroups.[Logon Name] = UserCounts.[Logon Name]
and ConsolidateGroups.CorpId = UsersAndGroups.[Logon Name]
---------------------------------------------------
Thanks in advance for any help.
 
I have not looked at the logic of the query but the syntax should be:

Update ConsolidateGroups,UsersAndGroups, UserCounts
SET ConsolidateGroups.ACL= UsersAndGroups.ACL
WHERE UserCounts.TotalACLs = 1
and UsersAndGroups.[Logon Name] = UserCounts.[Logon Name]
and ConsolidateGroups.CorpId = UsersAndGroups.[Logon Name]

Make sure you have a backup when you test this.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top