• Bob posted some code here. Bob's code looks OK, but I think the formatter saw a single quote in the comment and hence was thown out of phase.

    -- based on what we've seen

    insert #t

    select 'this is how' union all

    select 'we insert data' union all

    select 'for testing'

    declare @i int

    -- wouldn't it be nice to insert arrays so you didn't need to do union all

    set @i = 1

    select k as 'kay'

    /*

    block comments aren't right either

    what happens if I insert one

    */

    select j as 'jay'

    Basically, it looks like the scanner is recognizing single quotes in comments and hence getting confused. I've attache a screenshot previewing the above rather than try to describe it.

    Derek