Update Statement

  • The following statement keeps saying ResourseOwner.UserID is and invalid object name. What am I doing wrong?

    UPDATE dbo.ResourceOwner.UserID

    SET dbo.ResourceOwner.UserID = dbo.Testupdate.userid

    FROM dbo.ResourceOwner INNER JOIN

    dbo.TestUpdate ON dbo.ResourceOwner.RESOURCEID = dbo.TestUpdate.EquipId

    WHERE (dbo.TestUpdate.EquipName <> 'NULL')


    Thanks,

    Kris

  • you don't include the column in the UPDATE, only the SET.

    UPDATE dbo.ResourceOwner

    SET dbo.ResourceOwner.UserID = dbo.Testupdate.userid

    FROM dbo.ResourceOwner INNER JOIN

    dbo.TestUpdate ON dbo.ResourceOwner.RESOURCEID = dbo.TestUpdate.EquipId

    WHERE (dbo.TestUpdate.EquipName <> 'NULL')

  • omg. I didn't even notice der. Thanks for your help. Worked perfectly


    Thanks,

    Kris

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply