I think the string and comment handling needs a little more work
http://www.sqlservercentral.com/Forums/FindPost678555.aspx
--here's a single quote within a comment
select 'String 1', 012
select 'String 3', 789 -- that's not what I wanted to see
select 'String 5', 456 -- that's better
select 'String 7', 123 -- not quite
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability