Is it possible to do a parameter query in SQL Server like you can in Access, where a box will popup and prompt you for information to complete the query.
And can I store that parameter to variable so I can use it in subsequent quaries.
There is a fundamental difference between SQL Server and Access (as it pertains to your question).
Access is 2 applications in 1. With Access, there is a database engine. You submit queries, it responds with data. In addition to the database engine, there is the front end aspect. With the front end, you can create windows, forms, reports, etc...
With SQL Server, you have a database engine. This engine is far superior to the database engine that is available with Access (if you configure and tune it properly). SQL Server does ship with some 'client tools'. The most popular are (in no particular order) Enterprise Manager (EM), Query Analyzer (QA), and SQL Server Management Studio (SSMS). EM & QA are distributed with SQL 2000. SSMS is distributed with SQL 2005.
The client tools distributed with SQL Server should never be used by end users. Only developers should have access to these tools. It's too easy to completely destroy your database. For example... click on a table to highlight it, then press the delete button on your keyboard. Whoosh... there goes your table. The same thing applies to views, procedures, functions, etc... It's just too dangerous to allow end users access to these tools.
In light of the previous paragraph, having a popup window to prompt for a parameter is a bit meaningless. Since these tools are developed for developers, it's unnecessary.
If you insist, there is a way to accomplish this.
In these tools, when you right click on a stored procedure, then click OPEN, you will be presented with a dialog box prompting you for the value(s) of the parameter(s).
-George
"the screen with the little boxes in the window." - Moron
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.