クラシックファイルタイプは2021年1月をもって使用できなくなりました。クラシックファイルを移行することも、PDFをダウンロードすることもできます。詳細はこちら

recursive CTE to convert parent child to tree

回答済み
0

コメント

3件のコメント

  • Regan Edwards

    Hi Ganesh and welcome to Community!

    First, let's try using "WITH RECURSIVE" instead of just "WITH". Presto does not support "WITH" directly.

    Please let me know if you are still experiencing trouble! 

    0
  • Ganesh Karri

    Hi Regan,

    I tried with recursive but it displays an error than with recursive is not supported. 

    simple cte:

    WITH recursive "Numbers" AS
    (
    SELECT 1 AS "n"
    UNION ALL
    SELECT "n" + 1
    FROM "Numbers"
    WHERE "n"+1 <= 10
    )
    SELECT *
    FROM
    "Numbers"

    I am getting the following error.

    [Query failed (#20210602_225140_03779_m6jsc): line 1:1: Recursive WITH queries are not supported]

     

    Thanks,

    Ganesh

    0
  • Regan Edwards

    Ganesh, thank you for the feedback. This sounds like this may be a bug that we are experiencing. I would recommend reaching out to support and get their intake on the issue. I have included their contact information below.

    Phone: 800-706-6526
    Email: Support@workiva.com

    0

サインインしてコメントを残してください。