When I take your query and paste it into SQL analyzer I get the following 3 errors
Msg 8156, Level 16, State 1, Line 1
The column 'Id' was specified multiple times for 'TB'.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "TableB.Id" could not be bound.
Msg 8156, Level 16, State...