Online Documentation for SQL Manager for SQL server
Use the Function tab of UDF Editor to create/edit a user-defined function and specify its definition.
For your convenience the syntax highlight, code completion and a number of other features for efficient SQL editing are implemented. For details see Working with Query Data area and Using the context menu.
Note: A UDF is a Transact-SQL or common language runtime (CLR) routine that returns a value. User-defined functions, like system functions, can be invoked from a query. Scalar functions can be executed by using an EXECUTE statement like stored procedures.