Then either tableB is on another server, or your query has a derived table in it. Either way, you can't use the OUTPUT operator. If it's a derived table you can make that a temp table and you'll be okay, but if TableB or LogTable is on another server, you're out of luck. You'll just have to do two different INSERT INTO statements.
Everyday I learn something that somebody else already knew