|Ahh, sorry I'm not familiar with sql. If it's not saved in a txt file, or anything similar (dat), I'm not sure how you will be able to do this.|
If you can store the value in a variable that is readable by a batch file (I'm not sure how that would work) just use the code:
IF "%var%"=="1" command
IF "%var%"=="0" command
I don't know if this is what you meant by "we can store the value in a variable" or not.