• there is no GO after creation of table #B. In my opinion the select statements will fail with an error.

    I didn't try it out but that's what I suspect.

    Vera