Table-Valued functions are awesome, like a view with input parameters. Like this:
CREATE FUNCTION [dbo].[Function_Name] (@inputParameter int) RETURNS table AS Return ( WHERE = @inputParameter [])
Works in sql 2000+.
"Go forth into the source" - Neal Morse