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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 isql:set DOS value with Stored Procedure output value

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-08-01 : 07:45:20
Rakesh writes "Hi All,
I am trying to set the value of a dos variable with the
output value from a Stored Procedure in a dos batch file.

But this syntax does not work.Any idea

set var_count=0
isql /U userid /P pwd /n /S ServerName /d DBName /Q "pTestSP @PV_out=%var_count%"

Thanks
AR"

shsmonteiro
Constraint Violating Yak Guru

290 Posts

Posted - 2003-08-02 : 16:42:45
try to use osql instead isql:

Í've tested the following:

set table=sysobjects
set tid=99
set teste=teste.txt

osql /E /Q"Select * from %table% where id>%tid%" /o%teste%

notepad %teste%

and it worked like a charm


Sérgio Monteiro
Trust in no Oracle
Go to Top of Page
   

- Advertisement -