Set up a new Watcom SQL or Transact-SQL function on a Sybase IQ server.
Prerequisites
 Authenticate with Sybase IQ using an account that has DBA or Resource authority.- If you have DBA authority, you can create any type of function and assign any user as the owner.
 
- If you have Resource authority, you can create only SQL functions (not external functions), and all functions you create are owned by you.
 
 
 
Task- In the Perspective Resources view, select the resource and select .
 
- In the Administration Console, expand .
 
-  Select Functions, click the drop-down arrow that appears to the right, and select New.
 
- In the Create Function wizard, select the Sybase IQ resource on which the function is to reside.
 
- Select a user or group to own the function.
 
- Enter a name for the function.
 
- Select the language or SQL dialect for the function.
 
- Check Use SQL template to insert a hardcoded SQL template and skip the wizard page for specifying a return type. You can also set a Watcom SQL function to be deterministic or nondeterministic.
 
- If you chose not to use the SQL template, define a return variable on the Specify Return Type page.
 
- On the SQL page, edit the code provided by the wizard.
- Define input parameters: name, type, and default value.
 
- Enter function statements.
 
- Make any other changes needed to complete your function.
 
 
- (Optional) Enter a comment describing the function.
 Comments can include both HTML and Javadoc tags, so  you can incorporate them into your generated database documentation.
 
- Click Finish to save the function.
 
 The new function appears in the Functions list in the right pane of the Administration Console.