Thread: parameter query
View Single Post

   
  #2 (permalink)  
Old 02-28-2008, 06:55 PM
Danilo Popovic
 
Posts: n/a
Default Re: parameter query

I asked same question. ;-)

> You can't use parameters with a view. If you have MSSQL2000, then you

could
> use a table-valued function:
>
> create function dbo.GetProducts (@ProductID int)
> returns table
> as
> return (select ProductID, NameOfProduct from dbo.Products where ProductID

<
> @ProductID)
>
> select * from dbo.GetProducts(5)
>
> Otherwise, you can use a stored procedure.
>
> Simon
>
>





Reply With Quote