Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Halesha_Bandri
Contributor II
Contributor II

SQL Recursive CTE Implementation in Qlik Sense

Hello Everyone,

I wanted to implement SQL recursive CTE implementation in Qlik load script.

could you please help us on the same.

Source
original document number  copy document number 
doc_1 doc_2
doc_1 doc_3
doc_3 cod_4
doc_3 doc_5
doc_10 doc_11
doc_11 doc_12
doc_11 doc_13
doc_12 doc_14

 

Target
Root document number  original document number  copy document number  Root Path
doc_1 doc_1 doc_2 doc_1/doc_2
doc_1 doc_1 doc_3 doc_1/doc_3
doc_1 doc_3 cod_4 doc_1/doc_3/doc_4
doc_1 doc_3 doc_5 doc_1/doc_3/doc_5
doc_10 doc_10 doc_11 doc_10/doc_11
doc_10 doc_11 doc_12 doc_10/doc_11/doc_12
doc_10 doc_11 doc_13 doc_10/doc_11/doc_13
doc_10 doc_12 doc_14 doc_10/doc_11/doc_12/doc_14

 

 

 

Labels (3)
1 Reply
Or
MVP
MVP

Is there a particular issue you're having? I don't think there should be a difference between a regular CTE and a recursive one insofar as Qlik is concerned, since it just hands off the SQL to the database anyway.