Sqlcmd not running entire script through .bat/.cmd file?

12 Views Asked by At

I have a sqlcmd that looks at 2 databases in the same server, performs some joins, and then writes the results to a file.

The problem I am having is that if I execute this sqlcmd manually through cmd everything works as expected, BUT if I execute the same sqlcmd through a .cmd/.bat file, it will only execute the portion of the sqlcmd that deals with the first db (defined by -d).

I'm not 100% sure that is actually what is happening, but that is my best guess comparing the manually ran vs .bat/.cmd output files.

Thanks in advance, sorry if it isn't super clear.

0

There are 0 best solutions below