Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Prompt a user for Input from keyboard

Status
Not open for further replies.

arj26

Programmer
Mar 21, 2003
3
MX
Hi,
How do you prompt a user for input from the keyborad and then track that value and use it in a query using Microsoft SQL Server 2000.
 
Alter PROCEDURE sp_Prompt @Prompt VARCHAR(25)
AS
SELECT * FROM YourTable
WHERE yourField = @Prompt

This will prompt your user and pass the variable into the procedure.



Tyrone Lumley
augerinn@gte.net


 
Thanks for your help, but in my installation of SQL Server 2000 i don't have any procedure called sp_prompt, there are scores of other sp_* procedures but not this one. Is it an automatic installation procedure? Any help on this would be sincerely appreciated. Thanks.
 
There is no sp_Prompt stored proc. I think Databaseguy was suggesting that you write a stored procedure and pass the prompt to the procedure as a variable. sp_prompt appears to be a generic example of what you can do with a stored proc. Perhaps, Databaseguy will correct me if I'm wrong. If you want to get the best answer for your question read faq183-874 and faq183-3179.
Terry L. Broadbent - DBA
SQL Server Page:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top