SQL Server built-in function name

后端 未结 1 1445
离开以前
离开以前 2021-01-25 10:14

I\'m trying to update sum columns data like this:

update
   tableName
set
   score = myFunction(tableName.id)

In other hands I want to have a t

1条回答
  •  情歌与酒
    2021-01-25 10:36

    Try using the full name of the function, including the database and schema name:

    update
       tableName
    set
       score = ..myFunction(tableName.id)
    

    I think only the schema name is needed, but I've gotten in the habit of putting both.

    The documentation explains that at least the two part name is needed. If you don't know what schema are, then the following will probably work:

    update
       tableName
    set
       score = dbo.myFunction(tableName.id)
    

    0 讨论(0)
提交回复
热议问题