Hi everyone!
I'm new to SQL and am trying to query a view (dbo.) made from a D365 table. My goal is to do a recursive joins on 4 different views but to start with I tried something basic and received the following error: The query references an object that is not supported in distributed processing mode. Below is my code with column/datasource names changed for privacy.
WITH F AS
(SELECT ColumnA,
ColumnB 1 AS lvl
FROM dbo.datasource
WHERE ColumnB IS NULL
UNION ALL SELECT FL.ColumnA,
FL.ColumnB,
lvl + 1 AS lvl
FROM F
INNER JOIN dbo.datasource FL ON F.ColumnA = FL.ColumnB)
SELECT *
FROM F