User-defined SQL functions

You can include these in a scalar function:

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 variable.