You guys have never done this as a VIEW is a whole other table created by a query and you can include parameters in that query....it is freaking simple as well
build your view like you would any other with parameters....
Example:
USE [iepa]
GO
/****** Object: StoredProcedure [dbo].[get_Batch_Data] Script Date: 06/30/2015 11:41:38 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[get_Batch_Data]
@inparm varchar(12)
AS
select *
from batch_data
where COM_Batch_ID=@inparm
now call that view like this:
select from get_batch_data('61404') <<<< 61404 is the parameter being passed....
Pretty simple and very powerful as you can use a view to provide UNALTERABLE information to a subset of a table or a union of tables.
A view is NOT the table and so there are things you sometimes cannot do.
But these are the same things you can not do when you form a very complicated join/union in a query......been using the one above since 1999 so I know it works....