Got more questions? Find advice on: ASP | SQL | XML | Windows
Welcome to RegexAdvice Sign in | Join | Help

Tokenize SQL Query

  •  11-03-2007, 8:34 PM

    Tokenize SQL Query

    hi,

     i want to parse a file that contains SQL queries which can be executed within SQL Server Query Analyzer. The format of the file is

     SQL Statement 1

    GO

    SQL Statement 2

    GO

    SQL Statement 3

    GO

    etc

     What i want to do is extract each SQL statement, eg (SQL Statement 1, SQL Statement 2 etc). Each statement maybe multiple lines of valid transact SQL.

     Can somebody help with a regex to do this.

     

    thanks,

    rumballs

    Filed under: , ,
View Complete Thread