Thanks for the replies. I don't really understand the last one but I've made progress with your help ...
The final bit I'm stuck on is:
sql query returns 0 or 1
how do I convert this into my exit /b 1 or 0?
if ... but can't suss the syntax. how do i say if ... incoming value from batch 1 ....
Search found 3 matches
- 18 Nov 2011 05:27
- Forum: DOS Batch Forum
- Topic: Dos batch to return 1 or 0 exit code after SQL query.
- Replies: 5
- Views: 8582
- 18 Nov 2011 04:10
- Forum: DOS Batch Forum
- Topic: Dos batch to return 1 or 0 exit code after SQL query.
- Replies: 5
- Views: 8582
Re: Dos batch to return 1 or 0 exit code after SQL query.
Thanks ... is it possible to test this.
ie.
Batch 1 calls batch 2
Batch 2 runs sql & exits with the 0 or 1
Batch 1 returns something / does something with the exit code.
Sorry if these are totally dumb questions. Appreciate your time.
ie.
Batch 1 calls batch 2
Batch 2 runs sql & exits with the 0 or 1
Batch 1 returns something / does something with the exit code.
Sorry if these are totally dumb questions. Appreciate your time.
- 18 Nov 2011 03:23
- Forum: DOS Batch Forum
- Topic: Dos batch to return 1 or 0 exit code after SQL query.
- Replies: 5
- Views: 8582
Dos batch to return 1 or 0 exit code after SQL query.
I know this is basic stuff but I just can't figure it out. I need to do a sql query & depending on the outcome return an exit code of 1 or 0. It's to determine which is the principal database in a mirror pair & therefore which database should be backed up by my backup app. So the backup app ...