From: geebee on 27 Jul 2010 14:38 hi, I have the following in a batch file, intended to run a sql file.. it opens up the SQL file, but does not actually execute it. Am I missing something? I have looked at and tried tons of example... C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe -i c:\zigzag.sql -o c:\tiki.log pause Thanks in advance, geebee
From: Gene Wirchenko on 27 Jul 2010 17:30 On Tue, 27 Jul 2010 11:38:21 -0700, geebee <geraldjr30(a)hotmail.com(noSPAMs)> wrote: >I have the following in a batch file, intended to run a sql file.. it opens >up the SQL file, but does not actually execute it. Am I missing something? >I have looked at and tried tons of example... > >C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe -i ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I do not know if this is it, but this filename contains spaces. It should be quoted. >c:\zigzag.sql -o c:\tiki.log > > >pause Sincerely, Gene Wirchenko
From: geebee on 28 Jul 2010 12:10 hi, there were no spaces originally. im just not sure what i could be doing wrong. thanks in advance, geebee "Gene Wirchenko" wrote: > On Tue, 27 Jul 2010 11:38:21 -0700, geebee > <geraldjr30(a)hotmail.com(noSPAMs)> wrote: > > >I have the following in a batch file, intended to run a sql file.. it opens > >up the SQL file, but does not actually execute it. Am I missing something? > >I have looked at and tried tons of example... > > > >C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe -i > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > I do not know if this is it, but this filename contains spaces. > It should be quoted. > > >c:\zigzag.sql -o c:\tiki.log > > > > > >pause > > Sincerely, > > Gene Wirchenko > . >
From: Gene Wirchenko on 28 Jul 2010 13:48 [reordered to chronological] On Wed, 28 Jul 2010 09:10:33 -0700, geebee <geraldjr30(a)hotmail.com(noSPAMs)> wrote: >"Gene Wirchenko" wrote: > >> On Tue, 27 Jul 2010 11:38:21 -0700, geebee >> <geraldjr30(a)hotmail.com(noSPAMs)> wrote: >> >> >I have the following in a batch file, intended to run a sql file.. it opens >> >up the SQL file, but does not actually execute it. Am I missing something? >> >I have looked at and tried tons of example... >> > >> >C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe -i >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> I do not know if this is it, but this filename contains spaces. >> It should be quoted. >> >> >c:\zigzag.sql -o c:\tiki.log >> > >> > >> >pause >there were no spaces originally. im just not sure what i could be doing >wrong. Take a look at the caretted filename. I very much doubt that you have a directory name C:\ProgramFiles rather than C:\Program Files on your system. If there are any spaces in the path or the filename, quote the whole thing. Quoting will not hurt if there are no spaces. Sincerely, Gene Wirchenko
From: geebee on 29 Jul 2010 15:56 Hi, I now have: "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe -i c:\zigzag.sql -o c:\tiki.log" pause It opens up the query, but does not execute it, and the batch window has all of the following in it: C:\>"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe -i ' "C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe -i ' is not recognized as an internal or external command, operable program or batch file. c:\zigzag.sql -o c:\tiki.log" c:\>pause not sure what i need to change. thanks in advance, geebee "Gene Wirchenko" wrote: > [reordered to chronological] > > On Wed, 28 Jul 2010 09:10:33 -0700, geebee > <geraldjr30(a)hotmail.com(noSPAMs)> wrote: > > >"Gene Wirchenko" wrote: > > > >> On Tue, 27 Jul 2010 11:38:21 -0700, geebee > >> <geraldjr30(a)hotmail.com(noSPAMs)> wrote: > >> > >> >I have the following in a batch file, intended to run a sql file.. it opens > >> >up the SQL file, but does not actually execute it. Am I missing something? > >> >I have looked at and tried tons of example... > >> > > >> >C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqlcmd.exe -i > >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > >> I do not know if this is it, but this filename contains spaces. > >> It should be quoted. > >> > >> >c:\zigzag.sql -o c:\tiki.log > >> > > >> > > >> >pause > > >there were no spaces originally. im just not sure what i could be doing > >wrong. > > Take a look at the caretted filename. I very much doubt that you > have a directory name > C:\ProgramFiles > rather than > C:\Program Files > on your system. > > If there are any spaces in the path or the filename, quote the > whole thing. Quoting will not hurt if there are no spaces. > > Sincerely, > > Gene Wirchenko > . >
|
Next
|
Last
Pages: 1 2 Prev: Need help with date subtract from 3 business days. Next: Database source control |