Donate SIGN UP

sql

Avatar Image
Fiona | 15:38 Sat 19th Mar 2005 | Technology
2 Answers

Microsoft Access queries allow end users to input their own variables eg [Enter Name] - end user can input Smith and the data will be returned


Is it possible to do the same thing using SQL Server 2000 and how do you do it?


Gravatar

Answers

1 to 2 of 2rss feed

Best Answer

No best answer has yet been selected by Fiona. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
You have to set up a parameter query, ask the user for the values, then pass these to the query when you call it
If I understand your question correctly then instead of clicking drop down boxes and entering your search term (Smith) then you just have to type an SQL query:

Select firstName, lastName from nameOfTable where lastName = "Smith"

Instead of specifying first name etc. you can get all info on all the Smiths by doing:
Select * from tableName where lastName = "Smith"

You can actually do this in SQL Server AND in Access if you click on query and then change the view to "SQL View"

1 to 2 of 2rss feed

Do you know the answer?

sql

Answer Question >>