User-defined SQL functions

Use create function to create scalar functions that include:

Adaptive Server does not allow fetch statements in a scalar function that return data to the client. You cannot include :

You can include select or fetch statements that assign values only to local variables.

See the Reference Manual: Commands.