In SQL Server, you would create a stored procedure that accepts one or more variables and then the user would execute that stored procedure.
For example:
create procedure udp_myprocedure
as
declare @mydate datetime
select *
from mytable
where mydatefield > @mydate
that creates the stored procedure and this would run it:
exec udp_myprocedure '2003-06-10 12:00:00'
Check the Books OnLine for more information on stored procedures, create procedure, and variables.
-SQLBill