Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events
SOLVED

Trouble executing SQL 2 query

Avatar

Level 7

Hi,

I have slightly modified some SQL 2 queries from this page, but I cannot run them via CRX DE. Here's the query:

SELECT * FROM [cq:Page] WHERE PATH([cq:Page]) LIKE '/nodes/%'

The error message I am receiving is:

Query: SELECT * FROM [cq:Page] WHERE PATH([(*)cq:Page]) LIKE '/nodes/%'; expected: LENGTH, NAME, LOCALNAME, SCORE, LOWER, UPPER, or CAST

Any ideas why is this not working?

1 Accepted Solution

Avatar

Correct answer by
Level 10
1 Reply

Avatar

Correct answer by
Level 10

Look at [1] gives idea for reason and alternatives. 

[1]  http://jackrabbit.510166.n4.nabble.com/SQL2-via-davex-td3730048.html