But you can create Inline table valued function to do this:
Create Function test
(@var1 varchar(10), @var2 varchar(10))
Returns Table
as
Return(Select * from table1 where col1 = @var1 and col2 = @var2
union all
...
)
Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"