• I had the same issue.

    I copied the code into TextPad and got rid of the leading "spaces" within the CTEs. For example, there are 4 characters at the beginning of the line "Select 1 as n" that aren't really spaces.

    :w00t: