ok i've figured out the problem I wasn't specifiying the full server name. Thank you for your help. I have one more question however. I was noticing that when you pipe the output of the query to a file the last statement is the the only one to get piped to the output. I was wondering if there is a way to append other output to the file that you are piping to.
Thank you once again,