The stored procedure or scalar function <Name> cannot be specified as a FROM clause reference or as a target for an UPDATE, INSERT or DELETE statement.

You cannot specify either a stored procedure or a scalar function as a reference in a FROM clause. For example, FROM sp_myproc() is a SQL error because the FROM clause must reference a table source (such as a table, view, rowset function, user-defined function, derived table, or joined table).

Also, you cannot specify either a stored procedure or a scalar function as a target for an UPDATE, INSERT, or DELETE statement. For example, UPDATE sp_myproc() is a SQL error because the UPDATE clause must target a table, a view, or an inline function.

To correct this error

  • Remove the SQL statement that references the stored procedure or scalar function.