View Single Post

   
  #4 (permalink)  
Old 02-29-2008, 07:32 AM
Erland Sommarskog
 
Posts: n/a
Default Re: T-SQL too big for Task Scedule - HELP!

Edward (teddysnips@hotmail.com) writes:
> Could I please check that I have this correct?
>
> I put the script into a file - let's say, "myquery.sql"
>
> The Type of the task changes from TSQL to CmdExec.
>
> In the command window I enter:
>
> isql.exe /i myquery.sql
>
> Is that it? If so, where should myquery.sql be located, for isql.exe
> to find it? Or do I need to supply an absolute path? And should the
> path be in quotes?


As with any other command-line utility, ISQL will read from the current
directory. This is, if memory serves, %WINNT%/SYSTEM32. It goes without
saying that this is not a good place to put query script. So an absolute
path is to recommend. Quotes you need if the path contains special
characters.

It's also good to specify /o to get an output file. And /n to be saved from
all the 1> 2> etc.




--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Reply With Quote