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 |
TRACEYSQL
Aged Yak Warrior
594 Posts |
Posted - 2013-12-12 : 11:37:28
|
sqlcmd -S Servername -E "EXEC myprocedure 'myvalue',''" -h -1 -o c:\test.txt -ethe text.txt keeps putting inexec myprocedure 'myvalue'DATAVALUEI only want the DATAVALUE to return The sp has a return output value and when run it returns just the DATAVALUE, this parts is workingWhat switch is needed to not write the sql script to text file.After this is working i wish to read if COMPLETE do this or EXIT---Anyone got exampleset /p myvar=< c:\test.txtecho The sql variable is "%myvar%"@rem if "%myvar%"=="" (echo MyVar is Not defined) @rem else (echo MyVar is %myvar%)@rem if "%myvar%"==COMPLETE goto start@rem if "%myvar%"=="" goto cancel@rem :start@rem echo start@rem pause@rem :cancel@rem echo cancel |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|