Update with innerjoin giving error
Hi giving incorrect syntax near keyword开发者_如何学C 'INNER' for the below query.
UPDATE ObjectNotes
SET ObjectNotes.NoteHeaderToken=146
INNER JOIN po ON ObjectNotes.RefRowPointer = po.RowPointer
WHERE ObjectNotes.NoteHeaderToken=145
AND po.stat='O'
AND ObjectNotes.SpecificNoteToken=577804
Try like this.
UPDATE ObjectNotes
SET ObjectNotes.NoteHeaderToken=146
FROM ObjectNotes INNER JOIN po ON ObjectNotes.RefRowPointer = po.RowPointer
WHERE ObjectNotes.NoteHeaderToken=145 AND po.stat='O' AND ObjectNotes.SpecificNoteToken=577804
精彩评论