I am trying to get results from
SELECT *
FROM [cq:Page] AS s
and
SELECT *
FROM [nt:unstructured] AS t
Union is not working for me, any suggestions appreciated
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @KaustubaTM1 ,
AEM SQL2 doesnt support keyword "UNION", instead use "JOIN".
However, there should be a relation between both nodes like a parent-child, So then it will work.
I'm giving such an example for your quick referance, But if you want to deep dive & learn more. try link given above.
SELECT *
FROM [cq:Page] AS p
JOIN [nt:unstructured] AS u
ON ISDESCENDANTNODE(u, p)
Hi @KaustubaTM1
Try please this version of the query:
SELECT * FROM [cq:Page] AS x
UNION
SELECT * FROM [nt:unstructured] AS x
Hi @KaustubaTM1 ,
AEM SQL2 doesnt support keyword "UNION", instead use "JOIN".
However, there should be a relation between both nodes like a parent-child, So then it will work.
I'm giving such an example for your quick referance, But if you want to deep dive & learn more. try link given above.
SELECT *
FROM [cq:Page] AS p
JOIN [nt:unstructured] AS u
ON ISDESCENDANTNODE(u, p)