in reply to ALTER SPROC activation

simplest:
isql -U<login> -i <script_file>

of course, you could do it in a perl script like so:

update: corrected code

while (my $line = <$FH>) { my $batch; do { $batch .= $line; last unless $line = <$FH>; } until ($line =~ m/^\s*go\s*$/i); $dbh->do($batch) if ($line =~ m/^\s*go\s*$/i); }

Jason L. Froebe

Team Sybase member

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Replies are listed 'Best First'.
Re^2: ALTER SPROC activation
by ikegami (Patriarch) on Sep 19, 2005 at 16:46 UTC

    Your code requires two <FH> in a row to properly exit. You can't rely on that if FH is a device. Maybe you should use last OUTER and label the while loop as OUTER?

      yup you're right! thanks! :)

      Jason L. Froebe

      Team Sybase member

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

    A reply falls below the community's threshold of quality. You may see it by logging in.
A reply falls below the community's threshold of quality. You may see it by logging in.