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 |
|
blakmk
Starting Member
45 Posts |
Posted - 2003-09-04 : 07:03:53
|
| Im trying to retrieve the isql query output into a dos enironment variable. The query basically looks like thisSELECT 'set EnvVariable=' + column1 FROM table WHERE col1 = 'blah' > tempfile.batI'm redirecting the output to a file and then calling this file. The problem is that file also contains the number of rows effected by the query. eg (1 row affected)Does anyone know how to prevent this, or can suggest a better way to get the value back into an environment variable.Thanks in advanceMark |
|
|
Frank Kalis
Constraint Violating Yak Guru
413 Posts |
Posted - 2003-09-04 : 07:07:17
|
| Are you looking for SET NOCOUNT ON/OFF?See BOL for detailsCheers,Frank |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-09-04 : 12:41:09
|
| Yes, SET NOCOUNT ON is what you want. You also should include this command at the top of your stored procedures as a good programming practice. Also, use osql instead of isql. isql is going to be retired.Tara |
 |
|
|
|
|
|