In some situations when using scripts to create/update database in code, I had to split input SQL script file by GO statements, as SqlCommand doesn’t really understand it. But in some place, I’ve came to a strange-looking code that does exactly that but… in really weird and NOT correct way. So here we go. How NOT to write: //separator char not used in TSQL
char ch = '^';
//Ed: str is the text from SQL batch file
...