• I have figured out the reason behind the false syntax issue: TAB spaces! The code editor on the site doesn't seem to format tabbed spaces well and must be inserting some non-SQL characters instead causing the copied code to not parse properly. (I haven't tried running the code taken from the site in a character analyzing tool but I am sure it will find some unexpected characters.)

    I reposted the code without any tabbed spaces and have successfully parsed the copied code from the site.

    Also, I made a slight change to the code that will improve the data returned in the SQLStatementText and SQLBatchText columns. Please use the updated code.

    Amar