The answer to the question "Doctor, Doctor, it hurts when I do this" is "Do not do that". Have you considered that the SQL comment introducer is `-- `? Does the problem "go away" if you use proper SQL style comments (that is, do not do that anymore)? Try using a good text editor to replicate the three characters `-- ` in front of your commentary and see if that solves your problem?