Scalar functions, by definition, return a single value:
User-defined scalar functions return a single data value of the type defined in the RETURNS clause.
Source: Types of Functions on TechNet
If you want to return more than one value, you should use a table-valued function.
You could also try to somehow pack your two SMALLINT
values into one INT
or convert them into a string with some separator, but that could get complicated and is not really (in most cases) necessary.