Re: T-SQL too big for Task Scedule - HELP! Erland Sommarskog <esquel@sommarskog.se> wrote in message news:<Xns961423BE5D98Yazorman@127.0.0.1>...
> (teddysnips@hotmail.com) writes:
> > However, the text box where I can enter the SQL truncates at 231
> > characters.
> >
> > What can I do, short of running the job myself? Can I split it into
> > two or more tasks? If so, where should I split it? And can I
> > establish a dependency between them so that, in the event of one task
> > failing, the other(s) don't execute.
>
> But the script in a file and the run the job as a command-line job that
> fires up the script with ISQL.
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?
Normally I would research this myself, but as I stated in my original
post this contract only has a few weeks to run, and the new contract
is on SQL 2k so this won't be an issue.
Many thanks again.
Edward |