SQL Newbie HELP: The query references an object that is not supported in distr..

  • 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

     

  • Are you querying an object across a linked server or openrowset()?

     

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply