Reply to Re: Go and goto in one sql script gives error label not declared

Your name:

Reply:


Posted by BF on 01/15/07 13:23

Thanks for the quick respond.

The solution is not quite what I was hoping for.

For each new version I create an update script, We have an app which
does that and there are lots of Go commands.

I want to have one update script for all versions of the app so we have
2.00 to 2.01 to 2.02 to 2.03 etc.

For each version I have a script and I want to lookup the version, if
version is 2.03 I can start updating from 2.03 to 2.04 with the goto I
can jump over all other updates because they are already done in the
past.

When I use different files I cannot easy control which files to
execute, or I have to run them from the main script.

Grtx Bob

dmarkle schreef:
> Here's the trick with "GO":
>
> It's not actually a part of the T-SQL language. It's a batch
> separator. (Don't believe me? Try running "exec('GO')" in Query
> Analyzer.)
>
> Think of it like this: Cut up your script into multiple files,
> separated by the "GO" statement. Run each of these files individually,
> but use the same connection. That's all "GO" does.
>
> So you need to remove the "GO" batch separators in between your
> statements that need to be run in the same batch.
>
> -Dave Markle
> http://www.markleconsulting.com/blog
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация