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.
Author |
Topic |
woodsy1978
Starting Member
8 Posts |
Posted - 2011-07-11 : 11:54:43
|
Hi,I am attempting to get the BAT file to ask the user for 3 variables.... can anyone help me ?sqlcmd -STEMP7 -E -devolive_base -w256 -QEXIT("DECLARE @r int EXEC @r = usp_AddToObservationtbl $,$,$ SELECT @r") |
|
X002548
Not Just a Number
15586 Posts |
|
R0dst3r
Starting Member
1 Post |
Posted - 2011-08-04 : 18:21:33
|
Well, instead of being NOT helpful, I'll send you this way for some long-way-around examples of how to trap strings in a BATch file... http://www.robvanderwoude.com/userinput.php Although, I would highly recommend writing a simple command shell app in C#, VB, whatever - to store your inputs and then start the batch file containing the sqlcmd where the values are pushed into the parameters from the shell app. Heck, at that point, you could do away with the batch file completely and directly handle firing your SQL commands/stored procs...-Rod |
 |
|
|
|
|