Creating a UDF Using SQL Anywhere Dialects in Sybase Central

Watcom-SQL and Transact-SQL are SQL dialects supported by SQL Anywhere, and can be used when creating user-defined functions.

  1. In Sybase Central, connect to the database as a user with DBA or Resource authority.
  2. Select View > Folders.
  3. In the left pane, right-click Procedures & Functions and select New > Function.
  4. Enter a name for the function and select the user who will own the function.
  5. Select the SQL dialect or language for the function. Click Next.
  6. Select the type of value to be returned in the function, and specify the size, units, and scale for the value.
  7. Type a name for the return value and click Next.
  8. Add a comment describing the purpose of the new function. Click Finish.
  9. In the right pane, click the SQL tab to complete the procedure code.