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 |
|
Jim77
Constraint Violating Yak Guru
440 Posts |
Posted - 2005-12-19 : 09:04:02
|
| Hi there guys I am trying to run a sproc that accepts one int parameter from a batch file but keep geting a error message unidentified option error message.Does anything look wrong with this to you guys ?isql /USA /Password Dexter /Sjy2003smem001 /dLoyaltyDB /id:\data\membersimport\exec membernumallocate 43 cheers Jim. |
|
|
cfederl
Starting Member
26 Posts |
Posted - 2005-12-19 : 16:08:17
|
| Are you using Microsoft SQL Server ? To indicate a parameter, the use of slashes is more typical for Sybase on Unix. Windows uses a dash.If there are spaces in a file specification, enclose with double quotes.Lastly, ISQL.exe does not accept parameters that are to be passed to a stored procedure.Have you looked at using Data Transformation Services to solve your problem ?Carl Federl |
 |
|
|
Jim77
Constraint Violating Yak Guru
440 Posts |
Posted - 2005-12-20 : 05:13:03
|
| Thanks Carl, I realise the problem was with passing a argument to a sp, It doesn't like it in isql.NOt too importantas I only run this once a month .Thanks for your input. |
 |
|
|
nosepicker
Constraint Violating Yak Guru
366 Posts |
Posted - 2005-12-20 : 14:14:07
|
You can use either dashes or slahes for the parameters of isql or osql. They basically work the same way, but I would use the "osql" command since it's newer. And yes, you can pass parameters into stored procedures while using isql or osql. I'm not sure how you would want to use an input file, but if you simply want to execute a stored procedure and pass in a parameter, do something like this:osql /Usa /P /SYourPassword /dLoyaltyDB /Q"exec membernumallocate 43"Make sure you use upper case "Q" instead of lower case "q". Lastly, I hope that really wasn't your sa password that you posted here. I would edit that out ASAP if that is so. I would make sure it wasn't blank if that is so. |
 |
|
|
|
|
|