G
Guest
I am having to maintain an update process that was created by the person who
previously held my position. I don't know much of anything about the syntax
for sql statements.
I have an sql statement that will find a user and disable them. I need to
also update a field called COMMENTS that is also in the table. I was to
append the phrase "User disabled by Nightly Process" and the current date to
the entry already in the comments field.
Here is what I have:
strSQL = "UPDATE dbo_tblHPCUsers SET IsActive = 1, " & _
"TerritoryID = null, WebAccess = 0, Comments = "User
disabled by Nightly Process" & Date & Comments " & _
"WHERE (((dbo_tblHPCUsers.UserId)=" & idealid & " Or
(dbo_tblHPCUsers.UserId)=" & cstoneid & " " & _
"Or (dbo_tblHPCUsers.UserId)=" & heritageid & "));"
I get a compile error expected: end of statement.
Please tell me what I'm doing wrong.
thanks!
previously held my position. I don't know much of anything about the syntax
for sql statements.
I have an sql statement that will find a user and disable them. I need to
also update a field called COMMENTS that is also in the table. I was to
append the phrase "User disabled by Nightly Process" and the current date to
the entry already in the comments field.
Here is what I have:
strSQL = "UPDATE dbo_tblHPCUsers SET IsActive = 1, " & _
"TerritoryID = null, WebAccess = 0, Comments = "User
disabled by Nightly Process" & Date & Comments " & _
"WHERE (((dbo_tblHPCUsers.UserId)=" & idealid & " Or
(dbo_tblHPCUsers.UserId)=" & cstoneid & " " & _
"Or (dbo_tblHPCUsers.UserId)=" & heritageid & "));"
I get a compile error expected: end of statement.
Please tell me what I'm doing wrong.
thanks!