Create sql server view or any other method that accepts parameters

Hi..

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.

PROBLEM:
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????
LVL 8
jawahar_prasadAsked:
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.

OtanaCommented:
You can create stored procedures on SQL Server that accept parameters, you can get a recordset returned from those.
0
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.
0
Guy Hengel [angelIII / a3]Billing EngineerCommented:
you can create functions or stored procedures to accept parameters.
0
ICM_ITCommented:
for a procedure:

CREATE PROCEDURE usp_getSelect
@param1 varchar(10) = NULL
@param2varchar(10) = NULL
AS

SELECT * FROM TABLE
WHERE
param1 = @param1 AND
param2= @param2
0

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
0
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
Databases

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.