This section describes how to create custom functions in DMS.
You have access permissions to DMS and you have logged on to the DMS console.
Choose a target database and click Log On to Database, as shown below:
Functions, stored procedures, and events are programmable objects in DMS. In the left-side directory tree, click Programmable Objects tab. Programmable objects are displayed.
In the left-side directory tree, right-click Function and select Build(Function) in the menu.
Enter the basic information about the function.
Click OK to go to the edit page. DMS generates a function creation template. You only need to enter information in the function part, as shown below:
Enter information in the function parameter.
Click Save. DMS then checks whether the function is correctly defined. If the function definition is incorrect, DMS returns a message. DMS runs the function definition in your database and returns a message to indicate that the function has successfully been saved.
Click Execute to run the function.
Enter a parameter such as wednesday and click Execute. DMS then runs the function.
This function capitalized the initial of the string correctly. Alter “wednesday” to “Wednesday”.
Click Option Setting to set different options for the function. This operation is similar to Store Procedure.
You can also run the function in the SQL window.