Visual Database Tools
Including User-Defined Functions in a Query
You can include a user-defined function in a query. You can include any of the three types of functions:
- Non-updateable functions returning a table
- Updateable functions returning a table
- Functions returning a scalar
To include an updateable or non-updateable table function in a query or view
- Design the query to which you want to add the function. In the Query Designer, be sure the Diagram pane is visible.
- In the SQL Server Enterprise Manager, expand the Databases node and the particular node for the database you are working on.
- Click the User Defined Functions node.
- From the list of functions, drag the function onto the Diagram pane.
To include a scalar function in a query or view
- Design the query to which you want to add the function. In the Query Designer, be sure the Grid pane is visible.
- In the SQL Server Enterprise Manager, expand the Databases node and the particular node for the database you are working on.
- Click the User Defined Functions node.
- In the first blank row of the Grid pane, enter the name of the function in the Column column.