• Here is the error message

    Server: Msg 194, Level 15, State 1, Line 23

    A SELECT INTO statement cannot contain a SELECT statement that assigns values to a variable.