Skip to content
Advertisement

Can’t JOIN on CTE column inside CTE, unknown column

I am trying to achieve the following…

I get the following error:

Why can’t I reference the relations table?

Advertisement

Answer

Based on your CTE, this is just a guess, but I think you probably want:

We don’t know your table structures, so I can’t say I have the right columns for that join, but I’d say it’s a pretty educated guess.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement