UPDATE SQL Query not working - MSQL Server
I am trying to update a table in Microsoft SQL Server 2008, however it is
resulting in 0 rows affected. I am doing anything wrong as far as I know.
ApporvalBy is int and ApprovalReply is bit.
(Note at the moment both values are NULL but I also tried updating other
fields which aren't and same result)
UPDATE TblLeaveRequests
SET ApprovalBy = 1, ApprovalReply = 1
WHERE id = 41
I have also tried:
UPDATE TblLeaveRequests
SET ApprovalBy = 1
WHERE id = 41
And this:
UPDATE TblLeaveRequests
SET ApprovalBy = 1
WHERE id = 41 AND ApprovalBy IS NULL
None of these seem to work, and for the record there is and id of 41 in
the table.
No comments:
Post a Comment