Phil Factor (2/5/2012)
[font="Courier New"]WITHcteSomeCTE AS(--==== This is Jeff's 1st test commentSELECT yadayada
FROM sometable)--==== This Jeff's 2nd test comment
SELECT *
FROM cteSomeCTE[/font]
Well the poor old prettifier works with Jeff's code anyway!
Heh... I just knew that would come up. 😀
If you look at my original code, there is a single leading space before each SELECT. The prettifier includes that space (as you can see if you quote your own post) but we all know what happens to leading spaces in HTML. They disappear. They need to be entitized as hard spaces as they have been everywhere else leading spaces occur. Not sure why this usually only happens with SELECT but it's been that way ever since I starting using that fine bit of code.
--Jeff Moden
Change is inevitable... Change for the better is not.