Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 use of views parameters on sqlserver 2000

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-04-19 : 10:56:51
ELOY writes "how can i write a view using parameters??? in sqlserver i can't use PARAMETERS [VARIABLE] INT; SELECT....


MANY THANKS!!!! IT'S VERY IMPORTANT FOR ME TO KNOW IF THERE IS ANY SOLUTION..."

raymondpeacock
Constraint Violating Yak Guru

367 Posts

Posted - 2004-04-19 : 11:00:07
You can't parameterise a view. What you could try is returning a record set from a stored procedure where the stored procedure can have parameters such as field list, where clause, order by clause etc. The downside to this is that it won't optimisable by the query analyser and therefore won't be as efficient as a single view.


Raymond
Go to Top of Page
   

- Advertisement -