Calling user-defined functions

You can use a user-defined function, subject to permissions, in any place you use a built-in nonaggregate function.

This Interactive SQL statement returns a full name from two columns containing a first and last name:

SELECT fullname (GivenName, LastName)
FROM Employees;

fullname (Employees.GivenName,Employees.SurName)

Fran Whitney

Matthew Cobb

Philip Chin

...

The following statement returns a full name from a supplied first and last name:

SELECT fullname ('Jane', 'Smith');

fullname ('Jane','Smith')

Jane Smith

Any user who has been granted Execute permissions for the function can use the fullname function.

Related concepts
Creating user-defined functions
User-defined function restrictions
Compile and link switches for building dynamically linkable libraries
SQL data types
Related tasks
Dropping user-defined functions
Granting and revoking permissions


Created November 2, 2009. Send feedback on this help topic to Sybase Technical Publications: pubs@sybase.com