-
osql in batch file
Hi,
I am trying to run the following command. I am not getting the results that I expect.
For /f %%i in (\\testserver\dts_out\File_Ack_In.txt) Do osql -U %login% -P %pswd% -S %Server% -d %dbname% -Q "exec sp_process_inc_files %i,%filetype,%filesubtype"
I echo the values of the variables after I execute the command. When echo'd they return the correct values. And if i use these values to exec the proc from query analyzer, i get the results i expect. But running this in a dos batch file does not seem to work.
Any suggestions?
Thanks,
Jim
-
Why u r using percentage symbol? Shall u replace it with doble quote symble and try again
What does this real do?
-Q "exec sp_process_inc_files %i,%filetype,%filesubtype"
-
claire,
thanks for your reply - i figured out my question - to execute a proc via osql you need to specify the names of the input parameters (i.e. @var1 = %filename)
thanks
jim
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|