Cannot get this script to run

  • Hello, im trying to run this script:

    update Builds

    set Builds.SupportedByText = ComputerOperationsServerInformation.[Support Team]

    where Builds.ServerNameText IN

    (

    select ComputerOperationsServerInformation.Server, ComputerOperationsServerInformation.[Support Team]

    from ComputerOperationsServerInformation, Builds

    where ComputerOperationsServerInformation.Server = Builds.ServerNameText

    )

    But I receive the error message:

    Server: Msg 107, Level 16, State 3, Line 1

    The column prefix 'ComputerOperationsServerInformation' does not match with a table name or alias name used in the query.

    Can anyone see what im doing wrong? 😀

  • Your update statement is referencing a table in the WHERE clause. You need to reference ComputerOperationsServerInformation in your FROM clause to get this to work.

    Try this instead:

    updateb

    setb.SupportedByText = c.[Support Team]

    fromBuilds b

    inner join ComputerOperationsServerInformation c on c.Server = b.ServerNameText

    _____________________________________________________________________
    - Nate

    @nate_hughes

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

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