Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How can I add substitution variables in my script?

Author  Topic 

layesq
Starting Member

2 Posts

Posted - 2007-10-11 : 13:33:36
Hello,

I want to write a script that will allow the individual running the script (in Management Studio) to be able to insert different values to the WHERE clause. Basically I want to prompt the user for his/her input. How can I accomplish this?

Thanks for the help!
Layes

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2007-10-11 : 13:37:06
That is not possible in SSMS. To prompt users, you will need to write an application.

But you can train them to edit the variable values.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-10-11 : 15:10:25
"But you can train them to edit the variable values."

Hehehehe .. Good Luck!

I prefer your first suggestion: "Write an application" ...
Go to Top of Page

layesq
Starting Member

2 Posts

Posted - 2007-10-12 : 10:32:48
Thank your very much for getting back to Tara. Appreciate it!



quote:
Originally posted by tkizer

That is not possible in SSMS. To prompt users, you will need to write an application.

But you can train them to edit the variable values.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2007-10-12 : 10:59:32
Use M$ Access



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page
   

- Advertisement -