I am trying to build a program which execute sql statements in batch with error handling (therefore I am not using SMO).
the problem is that GO is not a part
Split only when "GO" stands on a lonely line or with whitespaces, like this:
Regex.Split(statements, @"^\s+GO\s+$");