Results 1 to 3 of 3

Thread: UPDATE Query

  1. #1
    Join Date
    Mar 2002
    Posts
    192

    Unanswered: UPDATE Query

    I am trying to implement an Update query in SQL Server.

    It is writtin in a Stored Procedure. However when I go to check syntax I receive an error "Incorrect Syntax near keyword INNER" error. The following is the SQL Statement. Any ideas?

    UPDATE
    tblIncidentHeader INNER JOIN tblIncidentDetail ON IncidentHeaderID = IncidentDetailIncidentHeaderID
    SET IncidentHeaderMyField = 'b'

  2. #2
    Join Date
    May 2002
    Posts
    299
    UPDATE tblIncidentHeader
    SET IncidentHeaderMyField = 'b'
    from tblIncidentHeader INNER JOIN tblIncidentDetail ON tblIncidentHeader.IncidentHeaderID = tblIncidentDetail.IncidentDetailIncidentHeaderID

    or

    UPDATE tblIncidentHeader
    SET IncidentHeaderMyField = 'b'
    from tblIncidentDetail
    where IncidentDetailIncidentHeaderID=tblIncidentHeader.I ncidentHeaderID
    --
    -oj
    http://www.rac4sql.net

  3. #3
    Join Date
    Mar 2002
    Posts
    192
    tnx. that worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •