Create sql server view or any other method that accepts parameters


I am planning to migrate my website which uses the MS ACESS Database to MS SQL Server 2000.
So, I have to move the tables and queries from access db to sql server.
I have no problem moving the tables.

I have to move the queries from access db to MS SQL SERVER as views..
The access queries gets a parameter and displays the results.
How do I move this with the same functionality to the SQL SERVER 2000????
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You can create stored procedures on SQL Server that accept parameters, you can get a recordset returned from those.
Ashish PatelCommented:
NO, views in SQL Server 2000 will not accept parameters so write a general query and then you can add where clause to the view in 2000 whenever you use them.
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you can create functions or stored procedures to accept parameters.
for a procedure:

@param1 varchar(10) = NULL
@param2varchar(10) = NULL

param1 = @param1 AND
param2= @param2

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jai STech ArchCommented:
the best bet is to create stored procedures which will accept parameters and perform...
but in case you want to use a repititive query (which will return a scalar value) you can use functions with parameters and a return value...again it all depends on wht you are doing with  your query
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.