SQL Server function that returns multiple rows
Posted on 2007-08-08
In SQL Server 2000, is there a way to set up functions that return multiple values?
For example, if table SALES_2007 has two columns: MONTH (01, 02, 03, 04, etc.) and SALES, and I'd like the function to take two parameters of type 2-digit month and return a list of values for all months between the two months entered.
So if someone entered FUNCTION('02, '04'), the function would return 3 rows, one for each month and the sales associated with each month.