We help IT Professionals succeed at work.

New podcast episode! Our very own Community Manager, Rob Jurd, gives his insight on the value of an online community. Listen Now!

x

Create sql server view or any other method that accepts parameters

2,316 Views
Last Modified: 2012-06-27
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????
Comment
Watch Question

Commented:
You can create stored procedures on SQL Server that accept parameters, you can get a recordset returned from those.
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 Engineer
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2009

Commented:
you can create functions or stored procedures to accept parameters.
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
Jai STech Arch

Commented:
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
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.